My Java Notes
Monday, 6 August 2012
Get nth Highest Salary from Employee Table
SELECT MAX(Salary) as 'Salary' from EmployeeDetails
where Salary NOT IN (SELECT TOP n-1 (SALARY) from EmployeeDetails ORDER BY Salary Desc)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment