drop procedure if exists insertMethod;
create procedure insertMethod(count int)
begin
declare i int default 1;
loop_name:loop -- 循环开始
if i > count then
leave loop_name; -- 判断条件成立则结束循环
end if;
INSERT INTO `user_5` ( `name`, `no`) VALUES ('test',CONCAT('T',UUID_SHORT()));
set i=i+1;
end loop; -- 循环结束
end;
-- 执行存储过程
call insertMethod(1000);
标签:end,name,--,循环,实例,mysql,insertMethod,loop
From: https://www.cnblogs.com/li-chuan/p/16711399.html