Write a SQL query to get the third highest salary of an employee from employee_table? code example
Example 1: n highest salary in sql
SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP N salary
FROM #Employee
ORDER BY salary DESC
) AS temp
ORDER BY salary
Example 2: n highest salary in sql
SELECT salary FROM Employee ORDER BY salary DESC LIMIT N-1, 1