日期:2014-05-16  浏览次数:20694 次

自动插入数据的mysql procedure

DROP procedure IF EXISTS insertdata;
create procedure insertdata(in size int)
begin
declare v int;
declare name varchar(40);
declare data varchar(255);
set v=0;
repeat
    set name = CONCAT('name',v);
    set data= CONCAT('data',v);
    insert into test(name,data) values("111", "222");
    set v=v+1;
until v >=size
?