题目:在一个员工表中查询薪水第二高的人 作为SeconHighestSalary字段返回
解法一:
select max(Salary) as SecondHighestSalary from Employee where Salary<(select max(Salary) from Employee);
解法二:
select IFNULL((select Distinct Salary from Employee order by Salary DESC limit 1,1),null) as SecondHighestSalary
大佬链接 https://blog.csdn.net/qq_40803710/article/details/80302535