left join right inner join 区别

Posted lixuchun

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了left join right inner join 区别相关的知识,希望对你有一定的参考价值。

连表查询

  select 

    a, b, c

  from 

    table_a tb_a

  left (right) join 

    table_b tb_b

  on

    tb_a.id = tb_b.id

  left : table_a, table_b 左边不满足条件的也返回

  right :  table_a, table_b 又边不满足条件的也返回

  inner join : 只返回满足条件的查询结果

以上是关于left join right inner join 区别的主要内容,如果未能解决你的问题,请参考以下文章

MS Access 多 (INNER, LEFT & RIGHT) JOIN 查询

(', CROSS, FULL, INNER, JOIN, LEFT, NATURAL, ON, RIGHT 或 USING 预期,得到'WITH'

sql JOINs - JOIN,INNER JOIN,LEFT JOIN,RIGHT JOIN,CROSS JOIN

inner join left join right join 和full join的区别

MySQL left join right join inner join

Mysql之inner join,left join,right join详解