O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required