JOIN

Also known as · Joins

Combines rows from two or more tables using a matching condition. Read 01 notes that JOIN is really part of the FROM step rather than a separate stage.

sql
SELECT f.title, i.inventory_id
FROM film f
JOIN inventory i ON f.film_id = i.film_id;

When to use

PS 03 and PS 04 build multi-table joins on Sakila by following foreign keys one hop at a time, for example store to inventory to rental to payment. PP 02 and PP 03 ask for the join type and the row count.

See PS 03.

Appears in

No references yet.