Shekhar Saxena's Blog For SQL Server
FAQ's Discussion News Technology SQL Server Programming Administration
Wednesday, April 19, 2006
Find Nth highest Salary
Its done like:-
SELECT MIN(SALARY) FROM EMPLOYEE
WHERE SALARY IN (SELECT DISTINCT TOP N SALARY FROM EMPLOYEE ORDER BY SALARY DESC)
---------------------------
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment