MSSQL Offset/Fetch
\nCREATE FUNCTION getNthHighestSalary(@N INT) RETURNS INT AS\nBEGIN\n    RETURN (\n        SELECT DISTINCT(Salary) \n        FROM Employee  \n        ORDER BY S
```\nCREATE FUNCTION getNthHighestSalary(@N INT) RETURNS INT AS\nBEGIN\n    RETURN (\n        SELECT DISTINCT(Salary) \n        FROM Employee  \n        ORDER BY Salary DESC\n        OFFSET @N - 1 ROWS FETCH FIRST 1 ROW ONLY \n    );\nEND\n```
[]