我有一张叫做排行榜的表
我创建的
create temporary table leaderboard
(
rank integer primary key auto_increment,
score_id integer,
game varchar(65),
user_id integer
)
select
id,
highscore,
playername
from
players
order by
highscore desc
这很好,但我现在尝试使用 id 中的连接来更新表。
UPDATE players
SET players.rank = leaderboard.rank
FROM players
JOIN leaderboard ON players.id = leaderboard.id
但是在mysql中出现错误?指针会很好
错误是
...在第 1 行的“从玩家加入排行榜 ON player.id = leaderboard.id”附近使用的正确语法