Finding nth highest salary from a table

I have a table. Let us have a look at the contents of it.



We will find out the second highest salary from this table. Write the following query in the query analyser.
  1. select min(salary) from EmpSalary where Salary in(select top 2 Salary from EmpSalary order by salary desc)  
Execute the preceding script.



For finding out the 3rd highest salary just replace 2 by 3 in the sql command.
  1. select min(salary) from EmpSalary where Salary in(select top 3 Salary from EmpSalary order by salary desc)