MySQL事件調度程序是這樣的:如何在mysql事件調度器中運行兩個更新查詢?
CREATE EVENT update_status
ON SCHEDULE EVERY 2 MINUTE
DO
BEGIN
UPDATE customer_group
SET is_status = 0
WHERE CURRENT_TIMESTAMP BETWEEN start_date AND end_date;
UPDATE customer_group
SET is_status = 1
WHERE CURRENT_TIMESTAMP NOT BETWEEN start_date AND end_date;
END
當我運行該腳本,也存在着錯誤這樣的:
Error Code: 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 '' at line 7
解決我的問題的任何解決方案?
非常感謝您
這就是爲什麼我在前一個問題中將其包裹在分隔符中。 – Drew
@德魯,非常感謝 –