Home » SQL & PL/SQL » SQL & PL/SQL » How can we retrieve the fourth maximum sal in emp table
How can we retrieve the fourth maximum sal in emp table [message #254424] Thu, 26 July 2007 13:45 Go to next message
nagaraju.ch
Messages: 98
Registered: July 2007
Location: bangalore
Member
to get this result i write this query


select * from (select * from emp order by sal desc) where rownum=3;

result is no rows selected

is it the right way or not
Re: How can we retrieve the fourth maximum sal in emp table [message #254427 is a reply to message #254424] Thu, 26 July 2007 13:48 Go to previous messageGo to next message
BlackSwan
Messages: 25038
Registered: January 2009
Location: SoCal
Senior Member
>is it the right way or not
Yes

Search this forum for "TOP N"
Re: How can we retrieve the fourth maximum sal in emp table [message #254429 is a reply to message #254427] Thu, 26 July 2007 13:51 Go to previous message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Topic closed.
./fa/448/0/
Regards
Michel
Previous Topic: what is the use of dual table in oracle
Next Topic: How can we delete duplicate values in table
Goto Forum:
  


Current Time: Mon Dec 05 15:12:10 CST 2016

Total time taken to generate the page: 0.11085 seconds