语法
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
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
—-想了解更多的linux相关异常处理怎么解决关注<计算机技术网(www.ctvol.com)!!>
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/uncategorized/52623.html