我試圖建立一個計劃的查詢,但是某些事情正在觸發一個錯誤,並且不清楚什麼是錯誤的。事件調度是一個有點新的給我,但我有很多其他工作,所以有一些信息我失蹤:Mysql事件計劃創建SQL錯誤
DELIMITER //
CREATE EVENT gen_firstJoins
ON SCHEDULE EVERY 1 HOUR
ON COMPLETION PRESERVE
DO BEGIN
CREATE TEMPORARY TABLE tmp_joins SELECT username, MIN(player_join) AS player_join FROM joins GROUP BY username ORDER BY player_join ASC ;
TRUNCATE joins_first;
INSERT INTO joins_first (username, player_join) SELECT username, player_join FROM tmp_joins GROUP BY username ORDER BY player_join;
END//
DELIMITER ;
錯誤:
ERROR 1064 (42000): 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 'ame, MIN(player_join) AS player_join FROM joins GROUP BY username ORDER BY playe' at line 6
你可能有隱藏的字符/換行符等?只需選擇並刪除整個工作「unsername」(在SELECT之後)並嘗試重新輸入? – Robbie
好吧,做到了 - 我不清楚線路突破是一個問題。謝謝! – helion3