Cannot insert explicit value for identity column in table when IDENTITY_INSERT is set to OFF.

This message is raised when you try to insert values in an identity column.

Identity columns are auto incremented by the system and thus, does not allow manual modifications/insertions. To resolve this error, you have to set the Column_Identity ON by using the following syntax.

SET IDENTITY_INSERT tblXYZ ON 

-- your insert statement here

SET IDENTITY_INSERT tblXYZ OFF


Leave a Reply