Why using LIMIT N-1,1 will cause error?
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\n    BEGIN\n    RETURN (\n          # Write your MySQL query statement below.\n          SELECT IFNULL((S
    CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\n    BEGIN\n    RETURN (\n          # Write your MySQL query statement below.\n          SELECT IFNULL((SELECT DISTINCT Salary FROM Employee ORDER BY Salary DESC LIMIT N-1 ,1), NULL)  \n      );\n    END\n\nThis was my code for the problem, but it seems there's an error near LIMIT N-1,1. Anyone has any idea why?
[]