nor*_*ole 13

我不确定ORACLE是否有TOP功能.您想使用TOP-N查询.

例如:

select  *
  from  (SELECT  *
           FROM  foo
          where  foo_id=[number]
       order by  foo_id desc)
 where  rownum <= 3   
Run Code Online (Sandbox Code Playgroud)

这将获得前三个结果(因为我在子查询中通过desc命令)