Home » SQL & PL/SQL » SQL & PL/SQL » how to find the top 5 biggest value from a query
how to find the top 5 biggest value from a query [message #35842] Thu, 18 October 2001 15:20 Go to next message
hugewater
Messages: 1
Registered: October 2001
Junior Member
Suppose there are 1000 values selected after a query, how can I find top 5 biggest values from the results

Thanks

----------------------------------------------------------------------
Re: how to find the top 5 biggest value from a query [message #35843 is a reply to message #35842] Thu, 18 October 2001 16:07 Go to previous message
Mark Hibberd
Messages: 2
Registered: October 2001
Junior Member
Try this...

select col_name
from table_name
where blah... blah... blah...
AND rownum <= 5
order by col_name

HTH,
-Mark

----------------------------------------------------------------------
Previous Topic: dynamic pl-sql and use of &
Next Topic: HELP! writing back in table
Goto Forum:
  


Current Time: Tue Apr 23 23:52:14 CDT 2024