输入banner图图片脚本导航/分类

LeetCode-SQL(一)

BEGIN declare @num INT
    select @num=count(distinct Salary) from EMPLOYEE    if(@N<0 or @N>@num)     set @N=0     RETURN (        select min(Salary)  from EMPLOYEE where  Salary in (        SELECT DISTINCT TOP (@N)  Salary FROM EMPLOYEE  order by Salary desc)             ); END


来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/second-highest-salary

 

LeetCode-SQL(一)

标签:stat   简单   用户   tco   arch   组合   div   table   employee