Total Answers and Comments: 12
Last Update: September 12, 2008
Submitted by : Ajay select sal from emp e where n-1=(select count(distinct sal) from emp where sal>e.sal); Above answer was rated as good by the following members: harinath_btech , Sowmya Viswanath
Sorting Options
Latest First
Oldest First
By Rating
May 16, 2006 16:11:30 #4
rajanipriya
Member Since: May 2006 Contribution: 19
RE: Find out nth highest salary from emp table Mr Ajay
Sir i couldnot understand the query u wrote for nth highest salary.
please explain in detail!!!!
Is this answer useful? Yes | No
July 24, 2006 10:24:37 #5
Shiv Mangal Rahi
RE: Find out nth highest salary from emp table Hi
Try this one.I hope u could able to get it
SQL> select min(sal) from (select sal from emp order by sal desc) where rownum<n+1 ;
Is this answer useful? Yes | No 1 0 Overall Rating: +1
December 07, 2006 09:43:51 #6
rampratap409
Member Since: September 2006 Contribution: 111
RE: Find out nth highest salary from emp table select * from emp where rownum< 9
minus
select * from emp where rownum <9
Is this answer useful? Yes | No
Go To Top