mysql存储过程命令行批量插入N条数据命令

原文: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;

原文地址:https://www.cnblogs.com/shihaiming/p/7363609.html