为什么这个程序不起作用?
DROP PROCEDURE IF EXISTS `incDate`;
CREATE PROCEDURE incDate(@fromdate date, @enddate date)
REPEAT
SET @fromdate = date_add(@fromdate, INTERVAL 1 DAY);
INSERT INTO `dentists`.`dayT` (`day`) VALUES (@fromdate);
UNTIL @fromdate > @enddate END REPEAT;
END
MySQL 只是给出了这个错误:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@fromdate date, @enddate date)