ITPub博客

首页 > 数据库 > MySQL > 简单的造数存储过程

简单的造数存储过程

原创 MySQL 作者:mhabbyo 时间:2016-11-21 11:39:58 0 删除 编辑
create table aaa(id int,userid int,username varchar(20000));

-- 存储过程造数
delimiter //
drop procedure if exists testinsert;
create procedure testinsert()
begin
 declare i int default 600000;
 
 while i < 900000
 do
         start transaction;
         insert into aaa set id=i , userid=i,username=concat('tt',i);
         select sleep(1);
         commit;
         set i=i+1;
 end while;
end//
delimiter ;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29291882/viewspace-2128795/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2013-12-23

  • 博文量
    56
  • 访问量
    136415