How To Fix The Error Cannot Insert Explicit Value For Identity Column In Table When Identity Insert Is Set To Off
In this article, we will discuss the error “Cannot insert explicit value for identity column in table when IDENTITY_INSERT is set to OFF” as shown below. The error arises when the user has set “identity_insert” to “OFF”. Then tries to insert data into the primary key column of the table explicitly. This can be explained using the example below. Database and table creation: First, create a database named “appuals”. Create a table named “person” using the following code....