我想选择与我最近的200条纪录不同。所以我写了这个
的查询select
distinct(server_ip)
FROM
resource_monitor where server_ip IN
(SELECT server_ip FROM resource_monitor ORDER BY id DESC LIMIT 0, 200
)
但这显示我错误
this version of mysql doesn't yet support 'limit & in/all/any/some subquery'
这个查询的替代方法是什么?
答案 0 :(得分:1)
select distinct t1.server_ip
from (select server_ip from resource_monitor ORDER BY id DESC LIMIT 200) as t1;