MYSQL | LIMIT & OFFSET
\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\nDECLARE K INT;\nSET K = N-1;\n  RETURN (\n      # Write your MySQL query statement below.\n    
```\nCREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\nDECLARE K INT;\nSET K = N-1;\n  RETURN (\n      # Write your MySQL query statement below.\n      SELECT (\n      SELECT DISTINCT SALARY \n      FROM EMPLOYEE\n      ORDER BY SALARY DESC\n      LIMIT 1 OFFSET K) AS getNthHighestSalary\n      \n      \n  );\nEND\n```\nPLEASE **UPVOTE**.
['MySQL']