-
20200324 连接查询作业
2020-07-24 10:571、查询张姓员工的员工信息和所在部门信息。
select * from emp left join dept on emp.dept_id = dept.id where emp.name like '张%'
2、查询张三丰管理了几个员工
select count(*) from emp e Inner join emp on e.id=emp.leader where emp.leader=1
3、查询出所有实习员工(实习员工无部门信息)
select * from emp left join dept on emp.dept_id = dept.id where dept.id is null