Summary

You have been introduced to one of the most robust features of SQL—the table join. Imagine the limits if you were not able to extract data from more than one table in a single query. You were shown several types of joins, each serving its own purpose depending on conditions placed on the query. Joins are used to link data from tables based on equality and non-equality. OUTER JOINs are very powerful, allowing data retrieved from one table, even though associated data is not found in a joined table. SELF JOINs are used to join a table to itself. Beware of the cross join, more commonly known as the Cartesian Product. The Cartesian Product is the result set of a multiple table query without a join, often yielding a large amount of unwanted ...

Get Sams Teach Yourself SQL in 24 Hours, Second 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.