--对结果集a分页
-- pageSize pageIndex 内层条件 外层条件
-- 10 1 rownum rn <= 1*10 rn > 0*10
-- 10 2 rownum rn <= 2*10 rn > 1*10
-- ... ... ... ...
-- s i rownum rn <= i*s rn > (i-1)*s
select b.* from (select rownum rn, a.* from a where rownum <= 1*10) b where rn > (1-1)*10
select b.* from (select rownum rn, a.* from a where rownum <= 2*10) b where rn > (2-1)*10
select b.* from (select rownum rn, a.* from a where rownum <= i*s) b where rn > (i-1)*s
对结果集分页sql
猜你喜欢
转载自blog.csdn.net/Jeason5/article/details/90473656
今日推荐
周排行