
Desicription
Write a SQL query to get the nth highest salary from the Employee table.
1 |
+----+--------+ |
For example, given the above Employee table, the nth highest salary where n = 2 is 200. If there is no nth highest salary, then the query should return null.
1 |
+------------------------+ |
Solution
1 |
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT |




近期评论