56,677
社区成员
发帖
与我相关
我的任务
分享
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