#1.先将薪水最高的找出来 #select max(salary) from `salaries`; #2.找出薪水第二高的 #select max(salary) from `salaries` where salary<(select max(salary) from `salaries`); #3.联表查出薪水等于这个第二高的员工 select e.emp_no,s.salary,e.last_name,e.first_name from `employees` e join `salaries` s on e.emp_no = s.emp_no where s.salary = (select max(salary) from `salaries` where salary<(select max(salary) from `salaries`));