MySql用where结合limit查询数据

2025-03-31 09:21:41
推荐回答(2个)
回答1:

select * from a where id not in(
select t.id from(
select id from a order by id desc limit 0,2
) t
) and type=1 limit 2,3

回答2:

select id from table where type=1 order by id desc limit 3