首页 > 运营 > 帮助中心 > 正文

使用存储过程实现循环插入100条记录

2020-03-29 17:43:48
字体:
来源:转载
供稿:网友
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 $$
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表