oracle top 替代方案

清泛原创

由于Oracle不支持select top 语句,所以在Oracle中经常是用order by 跟 rownum 的组合来实现select top n的查询。

select * from (
    select * from xxx order by xx
) where rownum <= 100
等同于SQL:select top 100 * from xxx order by xx。

分享到:
  网友评论(0)
 
回到顶部