HiSEN

oracle分页的三种方式

第一种:

1
2
3
4
5
select *
from (select t.*, rownum rn
from (select * from EW_AUTH_FLOW) t
where rownum <= 5)
where rn > 2;

第二种:

1
2
3
select *
from (select t.*, rownum rn from ew_auth_flow t where rownum <= 5)
where rn > 2;

第三种:

1
2
3
select *
from (select t.*, rownum rn from ew_auth_flow t)
where rn between 2 and 5;