当前位置:Gxlcms > 数据库问题 > mysql存储过程

mysql存储过程

时间:2021-07-01 10:21:17 帮助过:4人阅读

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;
 

mysql存储过程

标签:sel   roc   case   查询   usecase   cat   procedure   count   创建   

人气教程排行