mysql, use limit
\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\nDECLARE M INT;\nSET M = N-1;\n  RETURN (\n      # Write your MySQL query statement below.\n    
```\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\nDECLARE M INT;\nSET M = N-1;\n  RETURN (\n      # Write your MySQL query statement below.\n      select distinct salary from Employee order by salary DESC limit 1 OFFSET M\n  );\nEND\n```
[]