SET IDENTITY_INSERT value ON --Turns OFF identity
insert into value(Value,Name) (select Sno,Name from sno)
SET IDENTITY_INSERT Value OFF --Turns ON identity
hi this is good for sno.but i have 10 columns
Value Name dept branch code .....
a)I can fill the Value and Name using your insert query..but how to insert for rest of the columns?
b)Am i to write to insert queries like this for filling rest of the columns??
SET IDENTITY_INSERT value ON --Turns OFF identity
insert into value(Value,Name) (select Sno,Name from sno)
insert into value(dept,branch,code) values(@dept,@branch,@code)
SET IDENTITY_INSERT Value OFF --Turns ON identity
note(@dept,@branch,@code are passing as arguments)
Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator