就是取结果集的21-30条记录的一条sql语句?

解决方案 »

  1.   

    select *
        from 
         (
              select a.*,rownum rn
        from a)
    where rn>=21 and rn<=20
      

  2.   

    select * 
        from 
        ( 
              select a.*,rownum rn 
        from a
    where rownum<=30 

    where rn>=21 
      

  3.   

    select * from (select * from table order by 排序的字段名) where rownum between 21 and 30
      

  4.   

    1:select * from (select a.*,rownum rn from logan.table123 a) where rn>20 and rn<32;2:select * from (select a.*,rownum rn from logan.table123 a) where rn between 20 and rn31;
      

  5.   


    1: select * from(select a.*,rownum rn from logan.table123 a)where rn>20 and rn<32;2: select * from(select a.*,rownum rn from logan.table123 a)where rn between 21 and 31;