【oracle】之分页浅尝

来源:互联网 发布:php中截取字符串 编辑:程序博客网 时间:2024/05/17 01:25
  • 分页查询一
select * from (select a1.*,rownum rn from (select * from users) a1 where rownum <=5) where rn>=3;
  • 分页查询二
select a1.* from (select m.*,rownum rn from users m where rownum <=5) a1 where rn >= 3;
  • 分页查询三
select a1.* from (select m.*,rownum rn from users m) a1 where rn between 3 and 5;
1 0