OUTER JOINs

An OUTER JOIN operation returns all rows that match the JOIN condition, and it may also return some of the rows that don't match, depending on the type of OUTER JOIN used. There are three types of OUTER JOIN: RIGHT OUTER JOIN, LEFT OUTER JOIN, and FULL OUTER JOIN.

In INNER JOIN, the order of the tables in the query doesn't matter, whereas in OUTER JOIN, the order of the tables in the query is important.

Tip

A LEFT OUTER JOIN can be translated into a RIGHT OUTER JOIN, and vice versa if you change the order of the tables in the join.

An OUTER JOIN can be seen as the result of the union of an INNER JOIN and all unmatched rows in

  • The left table in the case of LEFT OUTER JOIN

  • The right table in the case of RIGHT OUTER JOIN

  • Or both in the ...

Get Microsoft® SQL Server™ 2000 Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.