每天以 1 小时的间隔为特定时间段创建 MySql 事件调度时出错。
我的代码是
CREATE EVENT your_event ON SCHEDULE
EVERY 30 MINUTE
STARTS '2013-10-01 10:00:00'
DO
IF time(CURRENT_TIMESTAMP) between time('10:00:00') and time('18:00:00')
then
INSERT INTO andrew (name) values ('test')
end if
错误是:
#1064 - 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 8 行的“end if”附近使用正确的语法