--子增长的插入
/*创建表*/
create table teacher
(
id int
identity(1,1) primary key not null,
name varchar(20)
)
select * from teacher
/*关闭自增长*/
SET IDENTITY_INSERT teacher on
insert into teacher(id,name) values(2000,‘guo‘)
/*打开自增长*/
SET IDENTITY_INSERT teacher off
insert into teacher(name) values(‘guo‘)
原文地址:http://www.cnblogs.com/lyl6796910/p/3778903.html