Types of Joins


Inner Join

Inner join is where data is joined so that only records that exist in both tables appear in the result.

  • returns only the rows where there is a match in both tables
  • typically the default join type

Left Outer Join

Left outer join is where the left table displays all results of the left table, while only matching records in the other (right) table appear in the result.

  • A left outer join ensures all records from the left table appear in the result
    • shows nulls when a match doesn’t exist

Right Outer Join

Right outer join is where the right table displays all results of the right table, while only matching records in the other (left) table appear in the result.

  • shows nulls when a match doesn’t exist

Full Outer Jon

Full outer join is where data is joined so that all records, matched or unmatched, show in the results.

Cross Join

Cross join/Cartesian join is where data doesn’t have a direct join on a key field.

  • produces all possible combinations of rows from both tables