| Author: Saurabh Rajput 23 May 2008 | Member Level: Bronze Points : 2 |
To Find Fifth Highest Salary
Select MIN(salary) FROM (SELECT DISTINCT TOP 5 salary from tblSalary ORDER BY salary DESC)
|
| Author: Kapil Dhawan 17 Jun 2008 | Member Level: Gold Points : 2 |
Hello Nice piece of code Thanks for sharing your knowledge with us. I hope to see more good code from your side This code is going to help lots of guys. Ton Thanks to you Regards, Kapil
|
| Author: Nagamohan kumar P 17 Jun 2008 | Member Level: Gold Points : 0 |
Nice Piece of Code it Really helped me
|
| Author: palla 01 Sep 2008 | Member Level: Silver Points : 1 |
hi,
another way is
select e1.salary from employees e1 where 2=select count(distinct(e2.salary ))from employees e2 where e1.salary>e1.salary)order by e1.salary
|