create procedure wk()
begin
declare i int;
set i = 1;
while i < 5 do
insert into t (myday) values (date_sub(curdate(),interval -i day));
-- select i;
set i = i +1;
end while;
end $$

 

posted on 2015-10-29 12:19  浊浊然  阅读(1095)  评论(0编辑  收藏  举报