select * from (
select rownum id, a.* from 
(select table_a.* from table_a group by column_a ) a where rownum<20) 
 where id>=10;

解决方案 »

  1.   

    例如:
     
    SQL> select ename
      2  from (select ename , row_number() over (order by sal) no from scott.emp)
      3  where no between 11 and 20
      4  /ENAME
    ----------
    JONES
    SCOTT
    FORD
    KING
      

  2.   

    select * from (
    select rownum id, a.* from 
    (select table_a.* from table_a group by column_a ) a where rownum<20) 
     where id>=10;
      

  3.   

    select * from 
    (select *,rownum myrow from table_a order by column_a)
    where myrow between 10 and 20
      

  4.   

    谢谢。问题解决了。
    但是order by中用来排序的一定得是主键才生效。用的就是zhenyukeji(何处是我家) 的方法。跟 bzszp(SongZip) 的方法比较相似吧。
    而guogexp(中华牙膏) 的方法在sqlplus中可以在pl*sql中却不行,row_number()后面的order by通不过语法检查。再次谢谢大家。结题了。