子查询
使用子查询的方式找出属于Action分类的所有电影对应的title,description
https://www.nowcoder.com/practice/2f2e556d335d469f96b91b212c4c203e
select
f.title,f.description
from film f join film_category fc using(film_id)
where fc.category_id = (
select category_id from category
where name = 'Action'
);
- 尽管
in
和=
都能得到相同的结果,但单一的返回我还是把它当成where gender = 'male'
之类的, - 如果返回是在
('male','female','wuzhuangzhishengji')
中,那就需要in
了