create table tablename(id int identity ( 1 , 1 ))
go
insert into tablename default values
go
set identity_insert tablename on
insert tablename(id) select 11
select * from tablename
go
-- set identity_insert tablename off
drop table tablename
/*
id
----
1
11
*/
本文转自曾祥展博客园博客,原文链接:http://www.cnblogs.com/zengxiangzhan/archive/2010/01/03/1638160.html,如需转载请自行联系原作者