Articles → SQL SERVER → Insert Value In Identity Column In SQL Server
Insert Value In Identity Column In SQL Server
"Identity_Insert" Statement
Syntax
Set Identity_insert table_name On / Off
Example
Insert into TestTable
values
(1, 'Test1')
Set Identity_insert TestTable On
Insert into TestTable (id, Name)
values
(1, 'Test1')
Set Identity_insert TestTable Off
Set Identity_insert TestTable Off
Video