MySQL Simple Solution
`\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\ndeclare M int;\nset M = N - 1;\n  RETURN (\n    select distinct salary from employee order by 
```\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\ndeclare M int;\nset M = N - 1;\n  RETURN (\n    select distinct salary from employee order by salary desc limit M, 1\n  );\nEND\n``
[]