This is working for me


  • 0
    B

    Re: NTH HIGHEST SALARY

    CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
    BEGIN
    DECLARE M INT;
    SET M = N-1;
    RETURN (
    # Write your MySQL query statement below.
    Select Distinct(Salary) From Employee Order By Salary DESC Limit M,1

    );
    END


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.