mysql 存储过程 和 触发器

一、存储过程

DELIMITER //

create procedure insert_test1(in loops int)

begin

declare v1 int;

set v1 = loops;

while v1 > 0 do 

insert into test1 values('99');

set v1 = v1 - 1;

end while;

end;

//

Call insert_test1(1);

猜你喜欢

转载自kayak2015.iteye.com/blog/2309424