我有两张桌子,username
和score
。两者都使用user_id
.
我想选择得分最高的前 5 个用户名。我正在尝试以下查询,但它不起作用:
SELECT `user_name`
FROM `username`
WHERE `user_id` = ( SELECT `u_id`
FROM `score`
ORDER BY `high_score` DESC
LIMIT 5 )
运行上述查询时出现此错误:#1242 - Subquery returns more than 1 row