set identity_insert test on
insert into test(id, name) values(1,'xahng')
set identity_insert test off
这样做会影响其他人插入这个张表吗?
生产库上,每分钟都会往这张表插数据,如果我set identity_insert test on 了,那其他方式插入这张表时不是会报错吗?
因为正常的插入是insert into test( name) values('xahng')
还有没有其他方法
create table test(id int identity, name varchar(10))
go
set identity_insert test on
insert into test(id, name) values(1,'xahng')
set identity_insert test off
go
select * from test
go
drop table test
go