怎么在一个表里面得到第400行到500行记录啊~~

解决方案 »

  1.   

    select * from (select * from tab where rownum <= 500) where rownum >= 400
      

  2.   

    或者
    select * from tab where rownum <= 500
    minus
    select * from tab where rownum <= 400
      

  3.   

    很显然只有第2种可以,ROWID 是不能取>的
      

  4.   

    Sorry。写错了。
    http://community.csdn.net/Expert/topic/5010/5010415.xml?temp=.236294
      

  5.   

    这样可以。
    select * from (select rownum id,t.* from tab t) where id >= 400 and id <= 500
      

  6.   

    select * from (select * from tab where rownum>=400)  where rownum<=100
      

  7.   

    select * from (select a.*,rownum rownum_ from (select * from tab) a where rownum <= 40)
    where rownum_>=10oracle推荐写法