📌  相关文章
📜  如何在sql代码示例中获取第n个数字

📅  最后修改于: 2022-03-11 15:04:50.944000             🧑  作者: Mango

代码示例1
Here is the solution for nth highest
salary from employees table 

SELECT FIRST_NAME , SALARY FROM 
(SELECT FIRST_NAME, SALARY, DENSE_RANK() OVER
(ORDER BY SALARY DESC) AS SALARY_RANK
FROM EMPLOYEES)
WHERE SALARY_RANK = n;