Learning..!

Prbhakaran J – Blog

MS SQL

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

The error says when we are inserting the our own values in identity column, You have skip the identity column value while inserting the data in table.

If can turn on identity insert on the table you can insert the your own values in the identity column.

Note:

When the IDENTITY_INSERT is set OFF. The PRIMARY KEY “ID” must not be present
When the IDENTITY_INSERT is set ON. The PRIMARY KEY “ID” must be present

Leave a Reply

Prabhakaran Jayaraman