select * from tablename
where rownum=>40 and rownum=<60

解决方案 »

  1.   

    select 
        a.*
    from 
        (select rownum as nid,* from table) a
    where
        a.nid between 40 and 60
      

  2.   

    To: a0003049(无名)
    假如你不明白rownum的用法,就不要乱写,误导别人。
      

  3.   

    select l.*
      from (select rownum as i, t.*
              from table_name t
             where rownum <= 60) l
     where l.i >= 40
      

  4.   

    大米的可以;
    将子陌红尘的修改一下:
    select *
    from (select rownum nid,t.* from table t)
    where nid between 40 and 60
      

  5.   

    当然是我的高一些啦^_^
    他的要扫描全表,如果改为
    select *
    from (select rownum nid,t.* from table t where t<=60)
    where nid between 40 and 60
    那么效率就一样了:)
      

  6.   

    pumag(大米) 
    别太得意忘形了,看看你写的句子,你觉得对吗?t<=60?哎,年轻人,嘴上无毛,办事不牢。