MySQL solution
\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n  DECLARE IND INT;\n  SET IND = N - 1;\n  RETURN (\n    # Write your MySQL query statement belo
```\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n  DECLARE IND INT;\n  SET IND = N - 1;\n  RETURN (\n    # Write your MySQL query statement below.\n    SELECT DISTINCT salary\n    FROM employee\n    ORDER BY salary DESC\n    LIMIT IND, 1\n  );\nEND\n```
['MySQL']