set identity_insert off
snippet in sql

identity insert on sql server

user2329

SET IDENTITY_INSERT sometableWithIdentity ON

INSERT sometableWithIdentity (IdentityColumn, col2, col3, ...)
VALUES (AnIdentityValue, col2value, col3value, ...)

SET IDENTITY_INSERT sometableWithIdentity OFF

identity_insert is set to off

user4571

SET IDENTITY_INSERT tbl_content ON

set identity_insert off

user7957

  
SET IDENTITY_INSERT [ [ database_name . ] schema_name . ] table_name { ON | OFF }