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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2021-11-20
  • 2021-11-18
猜你喜欢
  • 2022-12-23
  • 2022-01-09
  • 2021-12-13
  • 2022-12-23
  • 2021-08-01
  • 2021-05-25
  • 2022-12-23
相关资源
相似解决方案