Re: I need SQL to make a TOP10 - but how?

From: Eun-jeong Jeon <zeni_at_hananet.net>
Date: Tue, 28 Aug 2001 23:28:48 +0900
Message-ID: <w0glfy8LBHA.343_at_news2.sys.netsgo.com>


What about this solution?

You can use subquery...
If you want a top-10 salary list...

SQL> l
  1 select rownum as "Highest Sal", e.ename, e.sal   2 from (select ename, sal from emp
  3 order by sal desc) e
  4* where rownum <= 10
SQL> / Be happy all the time!!!
from zeni~

"Thomas Rokamp" <crax_at_mail.com> wrote in message news:3b8b9b73$0$1604$edfadb0f_at_dspool01.news.tele.dk...
> Hi!
>
> I want to make a TOP10 with just a single SQL call. No stored procedures.
> Just pure sql.
> But how is that done in ORACLE?
> In MS Access the function is TOP.
> In MySQL there is a LIMIT function...
>
> In Oracle there is...?
>
> Regards - Thomas Rokamp
>
>
Received on Tue Aug 28 2001 - 16:28:48 CEST

Original text of this message