select c.dept_no,a.emp_no,d.salary from employees a left join dept_emp b on a.emp_no = b.emp_no left join dept_manager c on b.dept_no = c.dept_no left join salaries d on a.emp_no = d.emp_no where c.emp_no != a.emp_no
多表关联之后,筛选一下即可
select c.dept_no,a.emp_no,d.salary from employees a left join dept_emp b on a.emp_no = b.emp_no left join dept_manager c on b.dept_no = c.dept_no left join salaries d on a.emp_no = d.emp_no where c.emp_no != a.emp_no
多表关联之后,筛选一下即可