use db_mysql;
select a.id,a.name ,b.*
from beauty a left outer join boys b on a.boyfriend_id=b.id
where a.id>3;
select a.city,b.*
from departments b right outer join locations a
on a.location_id=b.location_id
where b.location_id is null;
#一个部门可以0个或多个员工
select a.*,b.department_id,b.department_name
from departments b left outer join employees a
on a.department_id=b.department_id
where b.department_name in ('SAL','IT');