Thanks.Given a table with an ID IDENTITY column, and First and Last Name columns, to duplicate row with 1234 as ID:
INSERT INTO MyTable(FirstName,LastName)
SELECT FirstName, LastName FROM MyTable WHERE ID=1234|||What if there can be many tables that I'm duplicating from but I don't know what all the field names will be. Basically I want to be able to pass a table name and a primary key and I want to duplicate that record.
Any ideas?
No comments:
Post a Comment