Inserting Explicit Values into Identity Columns in T-SQL

The IDENTITY_INSERT property allows explicit values into the identity column of a table. Only one session at a time is allowed to have the IDENTITY_INSERT property set to ON. If the value inserted is larger than the current identity value for the table, SQL Server automatically uses the new inserted value as the current identity value.

 SET IDENTITY_INSERT  ON
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: