Chapter 5. Querying Multiple Tables: JOINs

In previous chapters, you have been dealing with queries that involve just one table. Sometimes the data you need to manipulate is spread across more than one table and, in this case, these tables must be combined or joined to be able to retrieve all this data. Basically, a JOIN operation merges two or more tables into one result set.

The capability to link or join tables and generate one result set from the data stored in many tables is one of the most important characteristics of a relational database. Usually, tables are linked using foreign keys, and these foreign key columns are used in JOIN operationsto combine tables and generate one result set. Notice that tables don't necessarily need to have ...

Get Microsoft® SQL Server™ 2000 Programming by Example 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.