Feb 3, 2010

Cannot insert explicit value for identity column in table

Msg 544, Level 16, State 1, Line 1
Cannot insert explicit value for identity column in table 'table1' when IDENTITY_INSERT is set to OFF.

Resolution:
run this query before inserts and then run it with mode set to 'OFF' once insert is done

SET IDENTITY_INSERT table1 ON

1 comment: