Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




Turning Off and On Identity Column in SQL Server

I have been moving over the data from one database to another. Issue came when data was entering in a table where idetity of a column was enable and I needed to enter the data as it is in identity column. I found solution.

SET IDENTITY_INSERT tablename ON

insert statement comes here

SET IDENTITY_INSERT tablename OFF

Share this article   |    Print    |    Article read by 3753 times
Author:
Rohit kakria
I am software developer, moderator of xpode.com
Related Articles:
Related Interview Questions: