56,803
社区成员




create procedure p1()
BEGIN
DECLARE a int;
DECLARE b int;
set a = 1;
set b=10;
CREATE TEMPORARY table temptb(
id int AUTO_INCREMENT PRIMARY Key,
v int
);
while b>0 DO
INSERT INTO temptb(v) values(a);
set b=b-1;
end while;
select * from temptb
UNION ALL
select * from temptb;
END