我想在表格“MyDates”中填入一系列日期,如下面的代码所示。当我运行代码时,我收到此错误“未知的系统变量'dateStart'”
DECLARE
dateStart DATE DEFAULT '2011-01-01';
DECLARE
dateEnd DATE DEFAULT'2011-12-31';
WHILE dateStart<=dateEnd DO
INSERT
INTO
MyDates
(
mydate
)
VALUES
(
dateStart
) ;
SET dateStart=date_add(dateStart,INTERVAL 1 DAY) ;
END WHILE;
END;