图解SQL的inner join、left join、right join、full outer join、union、union all的区别
@[TOC](
对于SQL的Join,在学习起来可能是比较乱的。我们知道,SQL的Join语法有很多inner的,有outer的,有left的,有时候,对于Select出来的结果集是什么样子有点不是很清楚。Coding Horror上有一篇文章,通过文氏图 Venn diagrams 解释了SQL的Join。我觉得清楚易懂,转过来。
假设我们有两张表。Table A 是左边的表。Table B 是...
转载
2018-11-22 14:38:43 ·
186 阅读 ·
0 评论