【发布时间】:2018-11-12 13:47:04
【问题描述】:
CREATE EVENT update_status
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE
ON COMPLETION PRESERVE
DO BEGIN
UPDATE OnDuty SET Status = '10-7' WHERE minute(timediff(Date,CURRENT_TIMESTAMP)) < 30;
END;
似乎无法让它工作,在 PHPMyAdmin 中它给了我这个错误:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 7
我迷路了。我不习惯在 MariaDB 中做日程安排。
【问题讨论】:
-
检查 event_scheduler 是否开启 stackoverflow.com/questions/20112395/…