SQL-LEFT JOIN
LEFT JOIN 关键字从左表(table1)返回所有的行,即使右表(table2)中没有匹配。如果右表中没有匹配,则结果为 NULL。
SELECT column_name(s)
FROM table1
LEFT JOIN table2
ON table1.column_name=table2.column_name;
实例
select emp_no
from (select * from employees e
left join dept_manager d
on e.emp_no=d.emp_no)
where dept_no is null