Defining Joins

Joins complete the triad of operations that a relational query language must provide: selection, projection, and join. The join operation lets you retrieve and manipulate data from more than one table in a single SELECT statement. Joining two tables is a little like making a seam to join two pieces of material. Once you have made the seam, you can work with the whole cloth.

You specify each join (there can be more than one in a single SELECT statement) on two tables at a time, using a column from each table as a connecting column or join column. Connecting columns should have values that match or compare easily, representing the same or similar data in each of the tables participating in the join. For example, the title_id column ...

Get Practical SQL Handbook, The: Using SQL Variants, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.