论复制粘贴
获取所有员工的emp_no
http://www.nowcoder.com/questionTerminal/e2dab5477fdd4ec0ba84031f8e817b8a
复制粘贴也不一定对
获取所有员工的emp_no、部门编号dept_no以及对应的bonus类型btype和received ,没有分配具体的员工不显示
题目里的received
和表结构里的recevied
和输出列名里的received
论复制粘贴,到底复制哪个好?
select e.emp_no,de.dept_no,eb.btype,eb.received
from employees e
inner join dept_emp de on e.emp_no=de.emp_no
left join emp_bonus eb on e.emp_no=eb.emp_no
select e.emp_no,de.dept_no,eb.btype,eb.recevied
from employees e
inner join dept_emp de on e.emp_no=de.emp_no
left join emp_bonus eb on e.emp_no=eb.emp_no