Joins

Joins are operations that allow you to match rows between tables. I informally call these operations horizontal because the virtual table resulting from a join operation between two tables contains all columns from both tables.

I’ll first describe the different syntaxes for joins supported by the standard, and I’ll also briefly mention legacy proprietary elements in T-SQL. I’ll then describe the fundamental join types and their applications followed by further examples of joins. I’ll also include a focused discussion on the internal processing of joins—namely, join algorithms.

You’ll have a couple of chances to practice what you’ve learned by trying to solve a problem that encompasses previously discussed aspects of joins.

Old Style vs. New ...

Get Inside Microsoft® SQL Server® 2008: T-SQL Querying now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.