Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Puzzle: Selecting top highest paid workers

Re: SQL Puzzle: Selecting top highest paid workers

From: NetComrade <andreyNSPAM_at_bookexchange.net>
Date: Fri, 22 Oct 1999 20:11:27 GMT
Message-ID: <3810c4e2.347898082@news.earthlink.net>


Doesn't work. Rownum gets retrieved first

On Fri, 22 Oct 1999 15:58:00 -0500, "Nick Willemse" <nwillemse_at_earthlink.net> wrote:

>Hi
>
>Oracle has got an intenal identifier counting the rows in a sql statement
>call ROWNUM
>
>You may try to use it as follows:
>
>SELECT Salary, Name
> FROM Employees
>WHERE ROWNUM < 51
> ORDER BY Salary DESC
>
>and it should give you the top 50 salary earners...
>
>good luck
>Nick
>
>NetComrade wrote in message <3810b063.342650830_at_news.earthlink.net>...
>>Hi,
>>
>>I think I misrepresented my previous post.
>>I need to know the top highest paid workers.
>>Ot top 50 highest anything.. :) for a nonsorted table of course...
>>
>>Thanx
>>---------------
>>Andrey Dmitriev eFax: (978) 383-5892 Daytime: (917) 373-5417
>>AOL: NetComrade ICQ: 11340726 remove NSPAM to email
>>
>
>
>


Andrey Dmitriev	 eFax: (978) 383-5892  Daytime: (917) 373-5417
AOL: NetComrade	 ICQ: 11340726 remove NSPAM to email

Received on Fri Oct 22 1999 - 15:11:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US