select * from table where rownum <=5;

解决方案 »

  1.   

    select * from table where rownum <=5
      

  2.   

    select * from (select rownum row_id,column from table order by column) where row_id <=5
      

  3.   

    取某个A-B区间的记录:
    select * from (select table.*, rownum as rid from table  where rownum<=B) where rid >=A
    或者
    select * from table where rownum<=B
    minus
    select * from table where rownum<=A
    注:minus 表示大区间减去小区间