How to find fifth highest salary in a single query in SQL Server

后端 未结 9 2476
暗喜
暗喜 2020-12-19 08:55

How to find fifth highest salary in a single query in SQL Server

9条回答
  •  暖寄归人
    2020-12-19 09:50

    You can find it by using this query:

    select top 1 salary 
    from (select top 5 salary
          from tbl_Employee
          order by salary desc) as tbl 
    order by salary asc
    

提交回复
热议问题