Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL PUZZLE: selecting top 50 salaries in a table
NetComrade,
The following SQL should work...
select salary from <table_name>
where rownum <= 50
order by salary desc
/
Essentially, only the first 50 rows of the salary listing is displayed in
descending order.
clj
NetComrade wrote in message <380f8e89.268436409_at_news.earthlink.net>...
>Well.. we know how to select top salary, which is select max(salary),
>but how would I select top 50 records?
>---------------
>Andrey Dmitriev eFax: (978) 383-5892 Daytime: (917) 373-5417
>AOL: NetComrade ICQ: 11340726 remove NSPAM to email
>
Received on Fri Oct 22 1999 - 13:11:58 CDT
![]() |
![]() |