各位用户为了找寻关于使用存储过程实现循环插入100条记录的资料费劲了很多周折。这里教程网为您整理了关于使用存储过程实现循环插入100条记录的相关资料,仅供查阅,以下为您介绍关于使用存储过程实现循环插入100条记录的详细内容
?
1
2
3
4
5
6
7
8
9
10
11
mysql> delimiter $$
mysql>
create
procedure
p3()
-> MODIFIES SQL DATA
->
BEGIN
->
set
@i=0;
->
set
@
max
=100;
-> while @i<@
max
do
->
insert
into
user
values
(@i);
->
set
@i = @i + 1;
->
end
while;
->
end
$$