MySQL使用存储过程循环插入数据

来源:互联网 发布:linux 制作iso 编辑:程序博客网 时间:2024/05/17 12:05
delimiter //create procedure myproc() begin declare num int; set num=1; while num < 10 do insert into t_tag(tag_name, tag_desc) values(concat("tag", num), concat("tag", num)); set num=num+1;end while; end//

0 0