Why joins are useful
Relational databases separate related information into tables. A join combines rows using matching key values, allowing an application to display related records without duplicating the same data.
INNER JOIN
An INNER JOIN returns rows where the join condition matches in both tables. It is useful when the result should include only records that have a related record.
LEFT JOIN
A LEFT JOIN keeps every row from the left table and includes matching values from the right table when available. Missing matches appear as NULL, which is useful for finding records without related activity.
Practise safely
Use clear aliases, qualify column names and test joins with small datasets. Check whether the join key is unique because duplicate matches can multiply result rows.


