search

Home  >  Q&A  >  body text

mysql - 查询结果作为条件与另一张表进行条件查询,并且作为其他表查询条件的结果也在最终的结果集出现

黄舟黄舟2829 days ago581

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 13:51:57

    select c from C inner join ( select b from B inner join select a  from A on B.b=A.a )  on C.c= B.b;
    
    分割线............
    
    select A.a,B.b,C.c from (select c   from  C where c-column= (select b from B where  b-column = (select a  from A ));
    

    The former is an inner koin connection query, and the latter is a from subquery.
    Recommend the former.

    I haven’t tried both pieces of code, maybe they are written incorrectly. Any advice is welcome

    reply
    0
  • Cancelreply