create table ta(id int identity(1,1),name nvarchar(5)) insert into ta select 'a' union all select 'B' union all select 'C' union all select 'D'set identity_insert ta on insert into ta (id,name) values (7,'F') set identity_insert ta off select * from tadrop table taresults: ------------------------------ 1 a 2 B 3 C 4 D 7 F
insert into ta select 'a'
union all select 'B'
union all select 'C'
union all select 'D'set identity_insert ta on
insert into ta (id,name) values (7,'F')
set identity_insert ta off
select * from tadrop table taresults:
------------------------------
1 a
2 B
3 C
4 D
7 F