如:
Select Top 5 * From Table或者有其他方法可以替代么?

解决方案 »

  1.   

    select * from table where rownum <6 order by 字段
      

  2.   

    select * from (select * from 表名 order by 字段) where rownum<6;
      

  3.   

    在oracle里面是没有top的,如果要取几行数据就如1楼所写吧!
      

  4.   


    -- 需要用子查询,在子查询里排序好(无非就是查询经过指定排序后,取前N条记录),3楼是正确的写法!select * from (select * from 表名 order by 字段) where rownum<6;