mysql生成日历表

begin
declare indexdate DATE;
set indexdate = DATE('2012-08-03');
while indexdate <= DATE('2013-12-31') do
insert into temp_date(create_date) values(indexdate);
set indexdate = ADDDATE(indexdate,1) ;
end while;
end

posted @ 2012-08-16 21:15  lily white  阅读(3570)  评论(0编辑  收藏  举报