Chapter 3. Joins

The FROM clause of a query is the first clause to be logically processed, and within the FROM clause, table operators operate on input tables. Microsoft SQL Server supports four table operators—JOIN, APPLY, PIVOT, and UNPIVOT. The JOIN table operator is standard, whereas APPLY, PIVOT, and UNPIVOT are T-SQL extensions to the standard. Each table operator acts on tables provided to it as input, applies a set of logical query processing phases, and returns a table result. This chapter focuses on the JOIN table operator. The APPLY operator will be covered in Chapter 5, and the PIVOT and UNPIVOT operators will be covered in Chapter 7.

A JOIN table operator operates on two input tables. The three fundamental types of joins are cross ...

Get Microsoft® SQL Server® 2012 T-SQL Fundamentals now with O’Reilly online learning.

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