时间:2021-07-01 10:21:17 帮助过:30人阅读
--如果想要用rownum不从1开始,需按下面方法使用
select a1.* from (select student.*,rownum rn from student) a1 where rn >5;
--分页查询一
select * from (select a1.*,rownum rn from (select * from student) a1 where rownum <=5) where rn>=2;
--分页查询二
select a1.* from (select student.*,rownum rn from student where rownum <=5) a1 where rn >=3;
--分页查询三
select a1.* from (select student.*,rownum rn from student) a1 where rn between 3 and 5;
Oracle数据库分页的三种方法
标签:等于 数据 style 查询 between 否则 -- 数值 rom