SELECT DISTINCT Salary AS SecondHighestSalary FROM Employee ORDER BY Salary DESC LIMIT 1,1
If I use SELECT(SELECT DISTINCT Salary FROM Employee ORDER BY Salary DESC LIMIT 1,1) AS SecondHighestSalary;
It will be accepted. But why the two select can return NULL but one select can't?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.