SQL 56) 获取所有员工的信息以及对应的bonus信息
获取所有员工的emp_no
http://www.nowcoder.com/questionTerminal/e2dab5477fdd4ec0ba84031f8e817b8a
方法)外连结
- 没有分配奖金的员工不显示对应的bonus类型btype和received
SELECT de.emp_no, de.dept_no, eb.btype, eb.received FROM dept_emp AS de LEFT JOIN emp_bonus AS eb ON de.emp_no = eb.emp_no;
SQL 文章被收录于专栏
SQL