Alternative solution using MAX()


  • 0
    G

    An alternative solution:

    SELECT MAX(Salary) AS 'SecondHighestSalary'
        FROM Employee
        WHERE Salary < (
            SELECT MAX(Salary)
                FROM Employee
            );
    

Log in to reply
 

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