子查询

使用子查询的方式找出属于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
全部评论

相关推荐

求个付费实习岗位:这种就是吃满时代红利又没啥技术水平,只能靠压力学生彰显优越感的老登,别太在意了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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