Table Expressions

So far, I’ve covered scalar and multivalued subqueries. This section deals with table subqueries, which are known as table expressions. In this chapter, I’ll discuss derived tables and common table expressions (CTE).

More Info

More Info

For information about the two other types of table expressions—views and inline table-valued functions—please refer to Inside Microsoft SQL Server 2008: T-SQL Programming (Microsoft Press, 2009).

Derived Tables

A derived table is a table expression—that is, a virtual result table derived from a query expression. A derived table appears in the FROM clause of a query like any other table. The scope of existence ...

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.