Outer Joins

An outer join occurs when you connect two tables and designate one of the tables as the main table. Executing an outer join returns the same matching records as an inner join, and also returns all the non-matching records from the main table. A full outer join returns all the records from each table in the join. Wherever data is unavailable, the results return a null value.

In our example, an outer join with the personnel table as the main table returns records of employees who are in the engineering departments, and also records of employees outside the engineering organization. The records of the non-engineering employees contain nulls in the department and project columns.

A full outer join on the personnel table and the engineering organization table in our example returns every record in each table, but combines the connected columns. There are three varieties of records returned:

See Also

Creating an Outer Join

Inner Joins

Performing Table Joins