'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

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

Is 'LEFT OUTER JOIN' equivalent to 'JOIN' in Microsoft SQL

sqlsql-server

提问by Coops

On this MSDN page, it shows that these are equivelant;

在这个 MSDN 页面上,它表明这些是等价的;

LEFT OUTER JOIN or LEFT JOIN

左外连接或左连接

My question, in MSSQL is

我的问题是,在 MSSQL 中

JOIN

also equivalent to

也相当于

LEFT JOIN

回答by aF.

No.

不。

JOINis 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.

and checking documentation:

检查文档

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。

-Source LEFT JOIN vs. LEFT OUTER JOIN in SQL Server

- 源LEFT JOIN 与 SQL Server 中的 LEFT OUTER JOIN