Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Monday, 15 October 2012

How to find out n th salary from a Table

SELECT MIN(Sal) FROM TableName
WHERE Sal IN
(SELECT TOP n Sal FROM TableName ORDER BY Sal DESC)