SQL SQL中RIGHT&LEFT JOIN与RIGHT&LEFT OUTER JOIN之间的区别
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3183669/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Difference between RIGHT & LEFT JOIN vs RIGHT & LEFT OUTER JOIN in SQL
提问by User 1034
What is the difference in results between:
结果之间的差异是什么:
- RIGHT JOIN and RIGHT OUTER JOIN
- LEFT JOIN and LEFT OUTER JOIN ?
- 右连接和右外连接
- 左连接和左外连接?
Can you please explain it through some examples?
你能通过一些例子来解释它吗?
回答by Pranay Rana
There is no difference between RIGHT JOIN
and RIGHT OUTER JOIN
. Both are the same. That means that LEFT JOIN
and LEFT OUTER JOIN
are the same.
RIGHT JOIN
和之间没有区别RIGHT OUTER JOIN
。两者都是一样的。这意味着LEFT JOIN
和LEFT OUTER JOIN
是相同的。
回答by Leonard
Here's a very nice Visual Explanationof joins generally by our very own Jeff Atwood. A right outer join is the same as a right join, and left join and left outer join are also the same.
这是我们自己的 Jeff Atwood 对连接的非常好的视觉解释。右外连接与右连接相同,左连接和左外连接也相同。
回答by onedaywhen
What is result difference between:
RIGHT JOIN and RIGHT OUTER JOIN
什么是结果差异:
右连接和右外连接
No difference.
没有不同。
LEFT JOIN and LEFT OUTER JOIN ?
左连接和左外连接?
No difference.
没有不同。
Simply put, the OUTER
keyword is optional. You can include it or omit it without affecting the resultset.
简而言之,OUTER
关键字是可选的。您可以包含或省略它而不影响结果集。