当前位置:首页 > 数据库 > 正文

Sql语句循环插入数据

2020-02-13 数据库

--循环执行插入100000条数据

declare @ID int
begin
set @ID=1
while @ID<=100000
begin
insert into table(ID)
values(@ID)
set @[email protected] 1
end
end

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/SQL/16092.html