Skip to content
Microsoft SQL Server

SQL Server Error 8101

An explicit value for the identity column can only be specified with a column list and IDENTITY_INSERT ON

Applies to: All supported SQL Server versions (2016 to 2025), Azure SQL Database, Azure SQL Managed Instance
Last technically reviewed 23 October 2026 on SQL Server 2025 (17.0.1145.4)
The full message
Msg 8101, Level 16, State 1, Line 1
An explicit value for the identity column in table 'dbo.Customers' can only be specified when a column list is used and IDENTITY_INSERT is ON.
Error number
8101
Severity
16 (user-correctable error)
State
1
Product
Microsoft SQL Server Database Engine
Versions
All supported SQL Server versions (2016 to 2025), Azure SQL Database, Azure SQL Managed Instance
Last reviewed
23 October 2026

What it means

Error 8101 means an INSERT without a column list supplied a value for the identity column; SQL Server only accepts an explicit identity value when the INSERT names its columns and IDENTITY_INSERT is ON.

An explicit identity value has two requirements, and the message names both: a column list on the INSERT, and SET IDENTITY_INSERT table ON in the session. 8101 is raised when the column list is missing and the values line up with every column including the identity column, whether IDENTITY_INSERT is ON or OFF. It is severity 16 and no row is inserted. The table is shown with its schema, for example 'dbo.Customers'.

Compare it with error 544, the column-list form: there the INSERT names the identity column and only the setting is missing. So the quickest reading is: 8101 means "add a column list" (and the setting, if you want your own ids); 544 means "turn IDENTITY_INSERT ON". If the values do not even match the number of columns, you get error 213 instead.

Common causes

  • SET IDENTITY_INSERT ON followed by INSERT ... VALUES without a column list, typical in hand-written migration scripts.
  • INSERT INTO target SELECT * FROM source, copying between two tables that both have an identity column.
  • A positional INSERT that includes a value for the id, written as if the identity column were an ordinary column.
  • Generated scripts (data exports, test fixtures) that omit column lists.

Diagnose it

Read-only These queries only read metadata and dynamic management views. They do not change data, permissions or configuration, so they are safe to run first.

List the table columns and spot the identity column

The column list you add must name the identity column plus every column you supply, in the same order as the values.

SELECT c.column_id, c.name, c.is_identity, c.is_computed
FROM sys.columns AS c
WHERE c.object_id = OBJECT_ID(N'dbo.Customers')
ORDER BY c.column_id;
What to look for

The row with is_identity = 1 is the column the positional values were trying to fill.

Check the shape of the source when using SELECT *

EXEC sp_describe_first_result_set
     N'SELECT * FROM dbo.Customers;';
What to look for

The source columns in order, including the identity column, which you can turn into an explicit column list.

How to fix it

Each fix is labelled with what it changes. Try read-only checks and the least invasive fix first, and test changes outside production.

Leave the identity value out

Changes data

If the original id does not matter, supply only the other columns and let SQL Server generate the key.

INSERT INTO dbo.Customers (name)
VALUES (N'Ana');

Add a column list and keep IDENTITY_INSERT ON for that insert

Changes data

To keep the original ids, name every column, including the identity column, and wrap the insert in IDENTITY_INSERT ON and OFF in the same batch.

Caution: Requires ownership of the table or ALTER permission on it, and only one table per session can have IDENTITY_INSERT ON. Make sure a primary key or unique constraint protects the column, because explicit values are not checked for uniqueness otherwise.

SET IDENTITY_INSERT dbo.CustomersCopy ON;

INSERT INTO dbo.CustomersCopy (id, name)
SELECT id, name FROM dbo.Customers;

SET IDENTITY_INSERT dbo.CustomersCopy OFF;

Examples

IDENTITY_INSERT is ON, but the INSERT has no column list

CREATE TABLE dbo.Customers (id INT IDENTITY(1,1) PRIMARY KEY, name NVARCHAR(100));
SET IDENTITY_INSERT dbo.Customers ON;
INSERT INTO dbo.Customers VALUES (10, N'Ana');
Result
Msg 8101, Level 16, State 1, Line 3
An explicit value for the identity column in table 'dbo.Customers' can only be specified when a column list is used and IDENTITY_INSERT is ON.

Reproduced on SQL Server 2025 (17.0.1145.4), 23 October 2026.

Copying with SELECT * between two identity tables

CREATE TABLE dbo.Customers (id INT IDENTITY(1,1) PRIMARY KEY, name NVARCHAR(100));
CREATE TABLE dbo.CustomersCopy (id INT IDENTITY(1,1) PRIMARY KEY, name NVARCHAR(100));
SET IDENTITY_INSERT dbo.CustomersCopy ON;
INSERT INTO dbo.CustomersCopy SELECT * FROM dbo.Customers;
Result
Msg 8101, Level 16, State 1, Line 4
An explicit value for the identity column in table 'dbo.CustomersCopy' can only be specified when a column list is used and IDENTITY_INSERT is ON.

Reproduced on SQL Server 2025 (17.0.1145.4), 23 October 2026.

A positional INSERT that supplies the id (IDENTITY_INSERT OFF)

CREATE TABLE dbo.Customers (id INT IDENTITY(1,1) PRIMARY KEY, name NVARCHAR(100));

INSERT INTO dbo.Customers VALUES (10, N'Ana');  -- 8101, not 544, because there is no column list
Result
Msg 8101, Level 16, State 1, Line 3
An explicit value for the identity column in table 'dbo.Customers' can only be specified when a column list is used and IDENTITY_INSERT is ON.

Reproduced on SQL Server 2025 (17.0.1145.4), 23 October 2026.

How to prevent it

Always write a column list in INSERT statements, including in migration and fixture scripts. With a column list, any remaining problem is clearly reported (544 when the setting is missing) and the script keeps working when columns are added.

Avoid SELECT * as the source of an INSERT. For data copy jobs, generate an explicit list from sys.columns once and keep it in the script. The DML commands lesson covers INSERT syntax.

Common questions

What is the difference between error 8101 and error 544?

8101: the INSERT has no column list but includes a value for the identity column. 544: the INSERT has a column list naming the identity column, but IDENTITY_INSERT is OFF. Fix 8101 with a column list; fix 544 with SET IDENTITY_INSERT ON.

I set IDENTITY_INSERT ON. Why do I still get 8101?

IDENTITY_INSERT alone is not enough. SQL Server also requires an explicit column list that names the identity column. INSERT INTO t VALUES (...) or INSERT INTO t SELECT * fails even with the setting ON.

Can I just leave the identity column out of a positional INSERT?

Yes. Without a column list, supply values for every column except the identity (and computed) columns, and SQL Server generates the id.

Learn more on CodeWithSQL

Official documentation

Last technically reviewed 23 October 2026; examples and diagnostics run on SQL Server 2025 (17.0.1145.4). Message text checked against the engine's sys.messages catalogue.

Still stuck on a SQL Server error?

Browse the full SQL Server error library, or get hands-on help from an experienced SQL professional.