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
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