declare @a int
set @a = 1
while @a<1000000
begin
insert into Test(name) values(@a)
set @a = @a + 1
end
sql中循环插入大量测试数据
最新推荐文章于 2024-11-02 19:15:10 发布
本文展示了一个使用T-SQL进行批量数据插入的例子。通过声明变量并利用循环结构,该脚本能够有效地向数据库表中插入大量连续数值记录。
1276





