leetcode 176. Second Highest Salary
查询第二大的数。
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;
【本文章出自博客园willaty,转载请注明作者出处,误差欢迎指出~】