176. Second Highest Salary
Contents
Solution
select (select salary from employee group by salary order by salary desc limit 1 offset 1) as SecondHighestSalary;
Summary
There is a trick to print null when result is empty.
Author Chen Tong
LastMod 2017-06-25