oracle10g 數據庫分頁

方法(1):

select *from (select tab1.*,rownum rn from emp tab1) tab2 where tab2.rn between 3 and 4;

方法(2):
select *from (select tab1.*,rownum rn from emp tab1 where rownum<=5) tab2 where tab2.rn>=3

注意rownum不是tab1的字段,不能用tab1.rownum rn

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章