select * from (select * from table order by 字段 desc) where rownum<=3  --3条

解决方案 »

  1.   

    select * from (select t.*,rank() over(patition by col order by col) rk
    from t)
    where rk<=3;
      

  2.   

    select * from (select t.*,rank() over(patition by col order by col) rk
    from t)
    where rk<=3;
      

  3.   

    select * from (select t.*,rank() over(patition by col order by col) rk
    from t)
    where rk<=3;
      

  4.   

    select * from (select * from table order by 登记号 desc) where rownum<=3  //两条select * from (select * from table order by 登记号 desc) where rownum<=3  //三条