Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

sql

sql-server

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

LEFT OUTER JOIN or LEFT JOIN

My question, in MSSQL is

JOIN

also equivalent to

LEFT JOIN
like image 239
Coops Avatar asked Feb 09 '12 10:02

Coops


People also ask

Is left join and left outer join same in SQL?

There really is no difference between a LEFT JOIN and a LEFT OUTER JOIN. Both versions of the syntax will produce the exact same result in PL/SQL. Some people do recommend including outer in a LEFT JOIN clause so it's clear that you're creating an outer join, but that's entirely optional.

IS LEFT join same as join?

The LEFT JOIN statement is similar to the JOIN statement. The main difference is that a LEFT JOIN statement includes all rows of the entity or table referenced on the left side of the statement.

Is join same as outer join?

The main difference between the Left Join and Right Join lies in the inclusion of non-matched rows. Left outer join includes the unmatched rows from the table which is on the left of the join clause whereas a Right outer join includes the unmatched rows from the table which is on the right of the join clause.

Is left outer join available in SQL?

SQL left outer join is also known as SQL left join. Suppose, we want to join two tables: A and B. SQL left outer join returns all rows in the left table (A) and all the matching rows found in the right table (B). It means the result of the SQL left join always contains the rows in the left table.


2 Answers

No.

JOIN is equivalent to INNER JOIN.


Check this example.
Since it returned the rows, we can assume it's an 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.

Also, according to this post, the type-part of the JOIN clause is optional:

For instance, the entire type-part of the JOIN clause is optional, in which case the default is INNER if you just specify JOIN.

like image 151
aF. Avatar answered Oct 14 '22 05:10

aF.


For instance, the entire type-part of the JOIN clause is optional, in which case the default is INNER if you just specify JOIN.

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

like image 3
Coops Avatar answered Oct 14 '22 04:10

Coops