Sql- How To Use Stored Procedure To Duplicate Row With New Primary Key?
I have 7 tables - Company, Person, Person_Link, Address, Address_Link, Phone, Phone_Link. I would like to have a Stored Procedure which intakes parameter of comp_companyid, then it
Solution 1:
I guess that you want to know , after inserting the first row in Company (for example), which is the ID of the company you just inserted.
SCOPE_IDENTITY()
will help you
Post a Comment for "Sql- How To Use Stored Procedure To Duplicate Row With New Primary Key?"