Monday 26 December 2011

Nth Highest Salary Record In Sql Server


SELECT TOP 1 [Salary]
FROM 
(
SELECT  DISTINCT TOP 2 [Salary]
FROM [dbo].[Employee]
ORDER BY [Salary] DESC
) temp
ORDER BY [Salary] 

No comments:

Post a Comment