select * from (select ROW_NUMBER() over (order by Location.id asc ) as rownum,* from Location) as L


where L.rownum between 1 and 10

相当于创一个临时表,先将其排序,然后根据rownum列分页

如下:

sql 根据rownum分页

结果:

sql 根据rownum分页

相关文章:

  • 2021-11-19
  • 2022-12-23
  • 2022-01-04
  • 2021-12-18
猜你喜欢
  • 2022-02-10
  • 2021-10-17
  • 2021-11-20
  • 2022-02-10
  • 2022-02-10
  • 2022-12-23
相关资源
相似解决方案