'LEFT OUTER JOIN' 是否等同于 Microsoft SQL 中的 'JOIN'
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9209123/
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
Is 'LEFT OUTER JOIN' equivalent to 'JOIN' in Microsoft SQL
提问by Coops
On this MSDN page, it shows that these are equivelant;
LEFT OUTER JOIN or LEFT JOIN
左外连接或左连接
My question, in MSSQL is
我的问题是,在 MSSQL 中
JOIN
also equivalent to
也相当于
LEFT JOIN
回答by aF.
No.
不。
JOIN
is equivalent to INNER JOIN
.
JOIN
相当于INNER JOIN
。
Check this example.
Since it returned the rows, we can assume it's an INNER JOIN
.
检查这个例子。
由于它返回了行,我们可以假设它是一个INNER JOIN
.
并检查文档:
INNER
Specifies all matching pairs of rows are returned. Discards unmatched rows from both tables. When no join type is specified, this is the default.
INNER
指定返回所有匹配的行对。丢弃两个表中不匹配的行。如果未指定联接类型,则这是默认设置。
Also, according to this post, the type-part of the JOIN clause is optional:
此外,根据这篇文章,JOIN 子句的类型部分是可选的:
For instance, the entire type-part of the JOIN clause is optional, in which case the default is INNER if you just specify JOIN.
例如,JOIN 子句的整个类型部分是可选的,在这种情况下,如果您只指定 JOIN,则默认值为 INNER。
回答by Coops
For instance, the entire type-part of the JOIN clause is optional, in which case the default is INNER if you just specify JOIN.
例如,JOIN 子句的整个类型部分是可选的,在这种情况下,如果您只指定 JOIN,则默认值为 INNER。