“左外连接”是否等同于微软SQL中的“JOIN”?

时间:2022-10-19 00:07:15

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

2 个解决方案

#1


65  

No.

不。

JOIN is equivalent to INNER JOIN.

连接等价于内部连接。


Check THIS example.
Since it returned the rows we can assume that's a 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 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,那么默认值是内部的。

#2


2  

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,那么默认值是内部的。

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

- SQL Server中的源左连接和左外连接

#1


65  

No.

不。

JOIN is equivalent to INNER JOIN.

连接等价于内部连接。


Check THIS example.
Since it returned the rows we can assume that's a 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 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,那么默认值是内部的。

#2


2  

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,那么默认值是内部的。

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

- SQL Server中的源左连接和左外连接