Explicitly set identity value in SQL Server

SQL server

When a table has an identity column with auto increment - to enable explicitly inserting a value into the id column run this:


SET IDENTITY_INSERT [table] ON

Note, this statement is valid only for the current session. It cannot be set permanently.

Post a Comment

Previous Post Next Post