--在查询的第二层通过ROWNUM <= ??? 来控制最大值,在查询的最外层控制最小值
select * from (select a.*,rownum rn from (select * from sa_staff_info) a where rownum <=2800) where rn >=2780;
--在查询的最外层控制分页的最小值和最大值
select * from (select a.*,rownum rn from (select * from sa_staff_info) a ) where rn between 2780 and 2800;
--用rownum来分页,并排序
select * from (select a.*,rownum rn from (select * from sa_staff_info order by login_name) a where rownum <=20) where rn >=11; 作者: 万望 时间: 2020-5-6 22:46 作者: 万望 时间: 2020-5-6 22:54
练习,练习作者: 张兴康 时间: 2020-5-7 16:47