步骤解析:

  1. 找出属于Action分类的电影id,记为临时表tmp

    select
    fc.film_id
    from
    category as c,
    film_category as fc
    where
    c.category_id = fc.category_id and c.name = 'Action'

    此时,生成的临时表是多行单列,列的属性为film_id

  2. 找出film中出现在tmp中的电影

    select
    f.title, f.description
    from
    film as f
    where 
    f.film_id in (
    select
    fc.film_id
    from
    category as c,
    film_category as fc
    where
    c.category_id = fc.category_id and c.name = 'Action'
    )