可以这样写
SELECT A.* 
FROM (SELECT ROWNUM num,T.* FROM TABELNAME T WHERE ROWNUM <n) A 
WHERE A.num > m

解决方案 »

  1.   

    要第一行到第10行数据,然后我又要11行到21行地数据,就有点象分屏输出。谢谢!
    方法一:
    select * from tablename where rownum<=10; (取1-10行)select * from tablename where rownum<=20
    minus 
    select * from tablename where rownum<=10;   (取11-20行)方法二:
    select * from (select rownum rn,tablename.* from tablename) where rn<10;         (取1-10行)
    select * from (select rownum rn,tablename.* from tablename) where rn>=11 and rn <=20;   (取11-20行)
      

  2.   

    建议使用分许函数来处理..select col_list
    from (
       select col_list,row_number() over (order by order_list) rn
       from table
       where ....
    )
    where rn >= m and rn < n
      

  3.   

    select * from (select rownum rn,t1.*,t2.* from t1,t2 where t1.a=t2.a) where rn>=11 and rn <=20;