MySQL:联接类型的快速细分 [英] MySQL: Quick breakdown of the types of joins
问题描述
我想快速细分MySQL联接的类型.我知道这些,其余的我都不知道它们是什么意思.
I would like a quick breakdown of the types of MySQL joins. I know of these, the rest I am not sure what they mean.
- 逗号分隔(这是精确的缩写吗?):
SELECT * FROM a, b WHERE b.id = a.beeId AND ...
- 显示来自a的信息,即使b中没有匹配项:
SELECT * FROM a LEFT OUTER JOIN b ON b.id = a.beeId WHERE ...
- comma separated (what exactly is this short for?):
SELECT * FROM a, b WHERE b.id = a.beeId AND ...
- show information from a, even if there are no matches in b:
SELECT * FROM a LEFT OUTER JOIN b ON b.id = a.beeId WHERE ...
我看过其他联接,但是想知道是什么使它们与众不同,什么是INNER
/OUTER
,添加LEFT
确实会改变事情.
I have seen other joins, but want to know what makes them different, what is INNER
/OUTER
, does adding LEFT
change things.
我已经知道联接的工作方式,我只是想知道是否还有其他类型的联接,或者它们只是获得相同结果的不同方式.
I already know how joins work, I just want to know if there are other types of joins, or if they are just different ways to get the same result.
推荐答案
或查看以下链接以获得良好的概述:
or see the following links for a good overview:
http://www.khankennels.com/blog/index.php/archives/2007/04/20/getting-joins/
http://www.codinghorror.com/blog /2007/10/a-visual-explanation-of-sql-joins.html
这篇关于MySQL:联接类型的快速细分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!