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. T-SQL 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, “Table expressions,” and the PIVOT and UNPIVOT operators will be covered in Chapter 7, “T-SQL for data analysis.”
A JOIN table operator operates on two input tables. The three fundamental ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access