题解 | #使用子查询的方式找出属于Action分类的所有电影对应的title,description#

使用子查询的方式找出属于Action分类的所有电影对应的title,description

http://www.nowcoder.com/practice/2f2e556d335d469f96b91b212c4c203e

# select title,description from film where film_id in 
# (select fc.film_id from category c inner join film_category fc 
# on c.category_id = fc.category_id where c.name = 'Action')

select f.title,f.description from film f where EXISTS 
(select fc.film_id from category c inner join film_category fc 
on c.category_id = fc.category_id where c.name = 'Action' and f.film_id
=fc.film_id)
全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务