题解 | #查找所有员工的last_name和first_name以及对应的dept_name#
查找所有员工的last_name和first_name以及对应的dept_name
http://www.nowcoder.com/practice/5a7975fabe1146329cee4f670c27ad55
select t.last_name,t.first_name,t.dept_name
-> from (select * from employees left join dept_emp on employees.emp_no = dept_emp.emp_no) as s
-> left join departments on s.dept_no = departments.dept_no;
先把三个表合并起来,再进行查询就可以啦~