Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Puzzle: Selecting top highest paid workers
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
>
Received on Fri Oct 22 1999 - 15:58:00 CDT