我正在尝试构建一个预定的查询,但有些东西触发了错误,目前还不清楚出了什么问题。活动安排对我来说有点新,但我还有很多其他人在工作,所以我缺少一些信息:
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):您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 6 行的 'ame, MIN(player_join) AS player_join FROM joins GROUP BY username ORDER BY playe' 附近使用正确的语法