How to change the value of identity column values in SQL Server ?

There are times when you want to insert the value of the identity column as a part of the insert query instead of using the default identify value. In this case , you can set the identity_insert to ON , perform the insertion and then switch the identity_insert to OFF.

How to change the value of identity column values in SQL Server ?

set identity_insert Employee ON
// Your insert query
set identity_insert Employee OFF

Leave a Reply