Outer join
An outer join combines matching rows from two inputs and preserves unmatched rows from one or both inputs, representing missing counterparts with null values.
DuckDB in Action
A full outer join preserves unmatched rows from both input relations and supplies NULLs on the missing sides.
- How it is used
- Preserves all systems or records when either side may lack optional matching information.
- How deep it goes
- Derives joins from Cartesian products and filtering, then demonstrates full outer join behavior with a small VALUES dataset.
- Examples
- Demonstrates joins over two VALUES relations keyed by id, producing matches and NULL-filled unmatched rows.
- What you can do after
- Apply it via DuckDB SQL to combine relations without discarding keys appearing on only one side.
Learn SQL in a Month of Lunches
A full outer join returns matching rows and preserves unmatched rows from both joined inputs, filling missing columns with null values.
- How it is used
- Combines complete results from two related tables when matching and unmatched rows from both sides matter.
- How deep it goes
- Defines the result and portability limits, but defers a full query walkthrough and alternative construction.
- Examples
- Uses promotion and orderheader tables to show matching rows and unmatched rows containing nulls.
- What you can do after
- Apply it via SQL to combine two tables while retaining unmatched rows from both inputs.
Read how Learn SQL in a Month of Lunches explains outer join →
Also covered in
- Grokking Relational Database Design
- Microservices Patterns, Second EditionIn early access (MEAP)
- Pandas Workout: 200 exercises to make you a stronger data analyst
- Kafka Streams in Action, Second Edition
What to know first
- joinA join is an operation that combines records or data elements from multiple inputs according to matching or related values or conditions.
- missing valueA missing value is an expected data value or observation that is absent, unavailable, unknown, or inapplicable.
Related concepts
- joinkind of · A join is an operation that combines records or data elements from multiple inputs according to matching or related values or conditions.
- API composerused by · An API composer invokes multiple service APIs and combines their results into a client response.
- Hibernateused by · Hibernate is a Java object-relational mapping and persistence framework that maps Java objects to relational database data and manages their persistence.
Questions about outer join
What is outer join?
An outer join combines matching rows from two inputs and preserves unmatched rows from one or both inputs, representing missing counterparts with null values.
Which Manning books explain outer join?
DuckDB in Action and Learn SQL in a Month of Lunches.
What should I know before learning outer join?
Manning books that teach outer join usually introduce join and missing value first.
What kinds of outer join are there?
Kinds of outer join include right outer join.
What is outer join a kind of?
Outer join is a kind of join. A join is an operation that combines records or data elements from multiple inputs according to matching or related values or conditions.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

