SQL17 获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
作者:互联网
描述
有一个薪水表salaries简况如下:
请你获取薪水第二多的员工的emp_no以及其对应的薪水salary
SELECT emp_no, salary FROM salaries WHERE to_date='9999-01-01' and salary = (SELECT salary FROM salaries WHERE to_date = '9999-01-01' GROUP BY salary ORDER BY salary DESC LIMIT 1,1 )
标签:salary,01,no,薪水,salaries,emp 来源: https://www.cnblogs.com/dtx123/p/15359779.html