原文:http://blog.csdn.net/tomcat_2014/article/details/53377924
delimiter $$ create procedure myproc () begin declare num int ; set num = 1 ; while num <= 15 do INSERT INTO rd_user (user_name, add_time, MOBILE_PHONE) VALUES (CONCAT('test',num), now(), NULL); set num = num + 1 ; end while ; end$$
-- 调用
call myproc();
-- 删除
drop procedure myproc;