Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

sqlserver insert with set identity

SET IDENTITY_INSERT sometableWithIdentity ON

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

SET IDENTITY_INSERT sometableWithIdentity OFF
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sqlserver #insert #set #identity
ADD COMMENT
Topic
Name
3+7 =