create procedure testInsert()
begin
declare i int;
set i=1;
while i<10000000 do
insert into test(name) values(i);
set i=i+1;
end while;
end;
MySql循环插入的存储过程
最新推荐文章于 2022-06-20 08:35:01 发布
本文介绍了一个使用循环进行大规模数据插入的存储过程示例。该过程通过一个整数变量递增并将其作为值插入到名为 test 的表中,直到达到一百万条记录。
226

被折叠的 条评论
为什么被折叠?



