Search⌘ K

Outer Joins Introduce Nulls

Explore how outer joins in PostgreSQL preserve rows while introducing null values when join conditions are not met. Understand the role of nulls in incomplete data scenarios and learn how to handle them in SQL queries.

The outer joins are meant to preserve rows from our reference relation and add to it columns from the outer relation when the join condition is satisfied. When the join condition is not satisfied, the outer joins then fill the columns from the outer relation with null values.

The outer join clause and null values

A typical example would be with calendar dates when we have not yet registered data at given dates. In ...