View Single Post
Old 07-06-08, 02:15 PM   #5 (permalink)
pradeep_kumar
Junior Member
 
Join Date: Nov 2007
Age: 25
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2 pradeep_kumar is on a distinguished road
Re: query to find 2nd or 3rd maximum salary from emp table

ok friend do not worry i am sending one query for you .you try this.


select * from emp e where
2 =(select count(distinct sal) from emp where e.sal<=sal)
or 3=(select count(distinct sal) from emp where e.sal<=sal);


if you got the answer ok.otherwise u can send another thread to me .my mail id is:pradeep.tanugula@gmail.com.Please put subject as oracle query for second or third max salary.


Best of Luck.
byeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee....

TANUGULA PRADEEP
pradeep_kumar is offline   Reply With Quote