创建存储过程向表中循环添加数据

时间:2014-05-09 01:04:44   收藏:0   阅读:293
CREATE PROCEDURE dowhile()
BEGIN 
DECLARE n int;
set n=1;
WHILE n<=1000
do
INSERT into hasindex(num) VALUES (n);
set n=n+1;
END WHILE;
END;
CALL dowhile();

创建存储过程向表中循环添加数据,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!