1、与limit相关的sql语句作为临时表
select * from 临时表
select B.id from (select id from test where id>100 limit 30) as B
缺点:只能查临时表的数据
2、可以查原表的数据
select * from test where id in(临时表)
select * from test where id in(select B.id from (select id from test where id>100 limit 30) as B order by B.id desc limit 10) as foo;

 

相关文章:

  • 2022-12-23
  • 2021-10-03
  • 2021-10-25
  • 2021-09-29
  • 2021-07-30
  • 2021-09-29
  • 2021-10-16
猜你喜欢
  • 2022-02-23
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案