【 tulaoshi.com - 编程语言 】
                             
                            语法 SET IDENTITY_INSERT [ database.[ owner.] ] { table } { ON | OFF } 
参数 
database ,是指定的表所驻留的数据库名称。 
owner 
是表所有者的名称。 
table 
是含有标识列的表名。 
使用举例子,往数据库中插入100万条记录。 
代码如下:
set identity_insert sosuo8database on 
declare @count int 
set @count=1 
while @count=1000000 
begin 
insert into sosuo8database(id,userName,userPWD,userEmail) values(@count,'ahuinan','ahuinan','sosuo8.com') set @count=@count+1 
end 
set identity_insert sosuo8database off