SQL Row_Number() function in Where Clause

后端 未结 10 1532
野性不改
野性不改 2020-12-02 16:11

I found one question answered with the Row_Number() function in the where clause. When I tried one query, I was getting the following error:

10条回答
  •  感情败类
    2020-12-02 16:52

     select salary from (
     select  Salary, ROW_NUMBER() over (order by Salary desc) rn from Employee 
     ) t where t.rn = 2
    

提交回复
热议问题