sql insert identity column value code example
Example 1: identity insert on sql server
SET IDENTITY_INSERT sometableWithIdentity ON
INSERT sometableWithIdentity (IdentityColumn, col2, col3, ...)
VALUES (AnIdentityValue, col2value, col3value, ...)
SET IDENTITY_INSERT sometableWithIdentity OFF
Example 2: insert into table with only identity column
INSERT INTO TABLE_NAME DEFAULT VALUES