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 ‘END$$DELIMITER’ at line 4

CREATE EVENT event_1 ON SCHEDULE EVERY 1 WEEK STARTS CURRENT_DATE + INTERVAL 6 - WEEKDAY(CURRENT_DATE) DAY DO BEGIN 
UPDATE 
    sonice_User 
SET 
    update_chance = "1"; END

解决方法:

     CREATE EVENT event_1 ON SCHEDULE EVERY 1 WEEK 
     STARTS CURRENT_DATE + INTERVAL 6 - WEEKDAY(CURRENT_DATE) DAY
     DO 
     UPDATE   sonice_User 
     SET update_chance = "1";
上一篇:C#事件-根据字符串引发特定事件


下一篇:变量值更改时的PyQt事件