要求该表有主键
select 主键 from table where 主键 no in (select 主键 from table where rownum<=n*30) where rownum<=30

解决方案 »

  1.   

    select * from table where rownum<=30*(n+1)
    minus 
    select * from table where rownum<=30*n
    n是第一页,第二页...
      

  2.   

    不行的,如果要是想选出特定的有些记录的话,就不能用上面的语句了,我曾经用过absolutepage来实现分页,在Access和SQLServer下都行的,但在oracle的环境下,就不行了,不知道是什么原因。
      

  3.   

    用这种方法怎么样:
     select * from (select rownum rn,* from table where rownum<=30*(n+1))  where rn>=30*n;
    我也在为分页的效率发愁,能不能?做个比较。