Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: To display 5 Largest values from table
param_gcs_at_hotmail.com (SQL_SAVVY) wrote in message news:<8e3f64bc.0303210334.3f1812c_at_posting.google.com>...
> i want to display first 3 persons with largest salary
Is it 5 or 3? You might want to use dynamic sql as the users might want to vary the number.
A quickie would be...
select * from
(select *
from salaries
order by salary_amount desc)
where rownum <= 3
Good luck
Greg
Received on Fri Mar 21 2003 - 08:38:07 CST