首页 > 开发 > Mysql > 正文

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

2019-10-19 15:38:16
字体:
来源:转载
供稿:网友
本节主要介绍了使用存储过程实现循环插入100条记录的具体实现,需要的朋友可以参考下
 
 
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 $$

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表