create procedure createDate()
begin
declare indexDate Date;
set indexDate = Date('2020-05-11');
while indexDate <= Date('2030-12-31')
do
insert into date_reference(date) values (indexDate);
set indexDate = ADDDATE(indexDate, 1);
end while;
end;
call createDate();
网友评论