分页SQL取下一页

分页语句;

----取第一页

select * from 
(
select a.*,rownum rn from 
(
select  a.*
  from dba_objects a 
 order by object_id 
) a
where rownum<=10
) where rn>=0;

---取第二页
select * from 
(
select a.*,rownum rn from 
(
select  a.*
  from dba_objects a 
 order by object_id 
) a
where rownum<=20
) where rn>=11;

---第三页

select * from 
(
select a.*,rownum rn from 
(
select  a.*
  from dba_objects a 
 order by object_id 
) a
where rownum<=30
) where rn>=21;

原文地址:https://www.cnblogs.com/hzcya1995/p/13352111.html