Fork me on GitHub

mysql存储过程

MySql存储过程初识
1.创建存储过程
create procedure myproc()
begin
declare num int;
set num=1;
while num <= 10000000 do
insert into tbl_store_order_revoke_info12(id,shopRefuseCase,revokeCase) values(num, CONCAT(num ,'@qq.com'), MD5(num));
set num=num+1;
end while;
end;
2.调用存储过程
call myproc();
3.删除存储过程
drop procedure myproc ;
4.查询结果
select count(*) from tbl_store_order_revoke_info;
 
posted @ 2018-12-12 12:24  MgicalFool  阅读(163)  评论(0编辑  收藏  举报