select MAX(Salary) from Employee where Salary < (select MAX(Salary) from Employee);
I really do not know why,could you help me?
I am not quite sure why yours didn't work. But my code below worked:
"select max(Salary) as SecondHighestSalary
where Salary < (select max(Salary) from Employee)"
@shiyi_dewie we two are the same,your anwser "as secondHighestSalary" there means nothing,but all thanks!
@shiyi_dewie but your code works,amazing!!
@Vricky it means nothing, however if you don't name it that way, you will see the error below that the expected column name is 'SecondHighestSalary' while your output's column name doesn't match with that
@shiyi_dewie exactly，I found this problem after using your code,thanks for your help
@Beca_se Ya,after test I know this usefulless code is useful...
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.