select employee_id,department_name
from employees e right join departments d
on e.department_id = d.department_id;
select employee_id,department_name
from employees e full outer join departments d
on e.department_id = d.department_id;
select employee_id,department_name
from employees e join
departments d
on e.department_id=d.department_id;
select employee_id,department_name
from employees e left join departments d
on e.department_id= d.department_id;
select employee_id,department_name
from employees e right
join departments d
on e.department_id= d.department_id;
select employee_id,department_name
from employees e left join departments d
on e.department_id where d.department_id is null;
select employee_id,department_name
from employees e left join departments d
on e.department_id= d.department_id is null;
select employee_id,department_name
from employees e left join departments d
on e.department_id= d.department_id;
#左下+右上
select employee_id,department_name
from employees e left join department_name d
on e.department_id = department_id
where departments_id is null;
select employee_id,department_name
from employees e left join departments d