Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to get third higest salary

Author  Topic 

immad
Posting Yak Master

230 Posts

Posted - 2015-04-20 : 02:11:30
hi,
my data looks like this

ID----------Name-----------------Salary
1------------A---------------------15000
2------------B---------------------12000
3------------C---------------------5000
4------------D----------------------8000

i want to get third higest salary
thanks for the help

immad uddin ahmed

Maithil
Starting Member

29 Posts

Posted - 2015-04-20 : 03:04:40
select a.Salary
from (select Salary,Row_Number() OVER(Order by salary DESC) RowNm from your_Table) a
where a.RowNm=3
Go to Top of Page
   

- Advertisement -