Write an SQL query to find the nth highest salary from table. Ans, Using Top keyword (SQL Server)- code example
Example 1: nth highest salary
SELECT salary FROM Employee ORDER BY salary DESC LIMIT N-1, 1
Example 2: 3rd height salary sql
SELECT MIN(EmpSalary) from (
SELECT EmpSalary from Employee ORDER BY EmpSalary DESC LIMIT 3
);