Chapter 4. Subqueries, Table Expressions, and Ranking Functions

This chapter essentially covers nesting of queries. Within an outer query, you can incorporate inner queries (also known as subqueries). You can use subqueries where a single value is expected (scalar subqueries)—for example, to the right of an equal sign in a logical expression. You can use them where multiple values are expected (multivalued subqueries)—for example, as input to the IN predicate. Or you can use them where a table is expected (table expressions)—for example, in the FROM clause of a query.

I’ll refer to ...

Get Inside Microsoft® SQL Server™ 2005: T-SQL Querying now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.