题目:
题目链接: https://leetcode-cn.com/problems/second-highest-salary/
解题思路:
主要考点在于limit和offset关键字的使用
需要注意的是,可能会出现没有第二高薪水的出现,所以需要使用ifnull进行判断
SQL:
select (select distinct Salary from Employee order by salary desc limit 1 offset 1) as SecondHighestSalary