sql 根据rownum分页


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列分页

如下:


结果:


猜你喜欢

转载自blog.csdn.net/qq_35534449/article/details/80449671
今日推荐