列出每位员工及其所在部门的名称。
- 通过
dept_id把员工和部门对上。 - 只输出能对上部门的员工:
dept_id为 null 的员工、dept_id在部门表里找不到的员工都不输出;没有员工的部门也不输出。 - null 键不与任何行匹配。
输入
employees(emp_id, name, dept_id, manager_id, hire_date, salary, title, email)departments(dept_id, dept_name, parent_dept_id)
输出
列为 name, dept_name,行顺序不限。