Share Blog

Saturday, March 08, 2014

How to Find the 3rd Highest Salary from Table

Syntax:select top 1 (column_name) from (select top 3 (column_name) from table_name order by column_name desc) as abc order by column_name asc

select top 1 (sal) from (select top 3 (sal) from salary order by sal desc) as abc order by sal asc
NOTE:For 3 you can replace any value...


No comments:

Post a Comment