Home » SQL & PL/SQL » SQL & PL/SQL » max 5
max 5 [message #187977] Wed, 16 August 2006 10:25 Go to next message
Messages: 1
Registered: August 2006
Location: India
Junior Member
How can i select first max5 salary from emp table
Re: max 5 [message #187990 is a reply to message #187977] Wed, 16 August 2006 11:03 Go to previous messageGo to next message
Yasir Hashmi
Messages: 304
Registered: April 2006
Senior Member
select sal from(select sal from emp order by sal desc)
where rownum<=5;
Re: max 5 [message #188092 is a reply to message #187990] Thu, 17 August 2006 01:55 Go to previous message
Messages: 7062
Registered: December 2001
Senior Member
Please, search for "top n" or have a look at the FAQ page.

Previous Topic: Splitting total records returned
Next Topic: How to create Foreign key Constraint with Cascade Options
Goto Forum:

Current Time: Tue Oct 25 21:37:10 CDT 2016

Total time taken to generate the page: 0.08822 seconds