Quantcast
Viewing latest article 5
Browse Latest Browse All 13

Insert Data and Primary Key value in to a table

How to insert data and a primary key value into a table. 

SET IDENTITY_INSERT tblData ON

Insert into tblData (pkVal, Val1, Val2)

Select pkVal, Val1, Val2  from tblData2 where x=y

SET IDENTITY_INSERT tblData OFF


Viewing latest article 5
Browse Latest Browse All 13

Trending Articles