They work in SQL Server 2000
DECLARE @result int SELECT TOP 5 @result = Salary FROM Employees ORDER BY Salary DESC
The syntax should be close. I can not verify this at the moment.
Or you can go with a subquery:
SELECT MIN(Salary) FROM ( SELECT TOP 5 Salary FROM Employees ORDER BY Salary DESC ) AS TopFive
Again, not positively if the syntax is exactly right, but the approach works.
recursive
source share