select last_name,first_name,d.dept_no
from employees as e join dept_emp as d on e.emp_no=d.emp_no;

使用一个内连接就好了,注意第一行的最后一个字段只能使用d表里的,因为d表是附表。