我的库中有若干条记录,我想分页显示在网页中,我取记录时不想使用where条件,只想有一个简单的方法,能让我第一次取出库中的7条记录,翻到第二页后把下面的7条记录再取出来。
也就是能有个函数来实现,第一次是(1,7),第二次是(8,7),第三次是(15,7)。

解决方案 »

  1.   

    不想使用where条件就用不了rownum
      

  2.   

    first page:select * from tab1 where rownum <= 7second page:select * from tab1 where rownum <= 14
    minus
    select * from tab1 where rownum <= 7third page:
    select * from tab1 where rownum <= 21
    minus
    select * from tab1 where rownum <= 14