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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 06:47:12  来源:igfitidea点击:

Difference between RIGHT & LEFT JOIN vs RIGHT & LEFT OUTER JOIN in SQL

sqljoinleft-joinouter-joinright-join

提问by User 1034

What is the difference in results between:

结果之间的差异是什么:

  1. RIGHT JOIN and RIGHT OUTER JOIN
  2. LEFT JOIN and LEFT OUTER JOIN ?
  1. 右连接和右外连接
  2. 左连接和左外连接?

Can you please explain it through some examples?

你能通过一些例子来解释它吗?

回答by Pranay Rana

There is no difference between RIGHT JOINand RIGHT OUTER JOIN. Both are the same. That means that LEFT JOINand LEFT OUTER JOINare the same.

RIGHT JOIN和之间没有区别RIGHT OUTER JOIN。两者都是一样的。这意味着LEFT JOINLEFT OUTER JOIN是相同的。

Visual Representation of SQL Joins

SQL 连接的可视化表示

回答by Mahesh

Nice explanation of SQL Join:

SQL Join的很好的解释:

enter image description here

在此处输入图片说明

Reference: link

参考:链接

回答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 OUTERkeyword is optional. You can include it or omit it without affecting the resultset.

简而言之,OUTER关键字是可选的。您可以包含或省略它而不影响结果集。