如何获取旧版本MySQL中记录的前3个值?

时间:2019-05-17 04:18:42

标签: mysql sql

例如 在数据库中: 1个 2 3 4 5 5

我想要得到: 5 5 4 3

我用这个:

select *
from product
where price in(
    select price from product group by price order by price desc limit 3
)
order by price desc

但是MySQL会响应此错误

#1235 - This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'

还有其他方法可以做同样的事情吗?

0 个答案:

没有答案