知识点
- 使用左连接的方法将两表连接,不要删去值有空值的记录
- 判定条件为电影分类id为空值
代码
select f.film_id, f.title
from film as f
left join film_category as fc
on f.film_id = fc.film_id
where fc.category_id is null
select f.film_id, f.title
from film as f
left join film_category as fc
on f.film_id = fc.film_id
where fc.category_id is null