直接看代码
create table test(
id int identity,
name varchar(100)
)
insert into test(name) values('MyKings')
set identity_insert test on
insert into test(id,name) values(100,'test')
set identity_insert test off
insert into test(name) values('demo')
执行好后,看结果
select * from test