This blog shows on how to Get nth highest salary of an employee in sql server table

Example : this query gets the 6th highest salary of the employee

SELECT TOP 1 EMPSalary
FROM (
SELECT DISTINCT TOP 6 EMPSalary
FROM employeemaster
ORDER BY EMPSalary DESC) a
ORDER BY EMPSalary
Ebook Download
View all
Learn
View all