Using Joins
A query that extracts data from more than one table must perform a join. In the following sections, I’ll explain the different types of joins (Table 7.1), why they’re used, and how to create SELECT statements that use them.
The important characteristics of joins are:
The two join operands (input tables) usually are called the first table and the second table, but they are called the left table and the right table in outer joins, in which table order matters.
The tables always are joined row by row and side by side by satisfying whatever join condition(s) you specify in the query.
Rows that don’t match may be included or excluded, depending on the type of join.
Values in joined columns usually are compared for equality (=), but you also ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access