Lc176-第二高的薪水


第二高的薪水



# Write your MySQL query statement below
--排序后用limit找到第二条数据 --ifnull函数为了观看直观并且拼凑null的情况 --distinct为了避免相同工资都参与排序的情况 select ifnull((select distinct salary from Employee order by Salary desc limit 1,1),null) as SecondHighestSalary
原文地址:https://www.cnblogs.com/xiaoshahai/p/12144042.html