Murach's SQL Server 2005 for Developers
How to code subqueries

This chapter teaches you how to code subqueries. A subquery is a SELECT statement that's coded within another SQL statement, allowing you to do more complex queries than you could otherwise.

Chapter 6 How to code subqueries
An introduction to subqueries 168
How to use subqueries 168
How subqueries compare to joins 170
How to code subqueries in search conditions 172
How to use subqueries with the IN operator 172
How to compare the result of a subquery with an expression 174
How to use the ALL keyword 176
How to use the ANY and SOME keywords 178
How to code correlated subqueries 180
How to use the EXISTS operator 182
Other ways to use subqueries 184
How to code subqueries in the FROM clause 184
How to code subqueries in the SELECT clause 186
Guidelines for working with complex queries 188
A complex query that uses subqueries 188
A procedure for building complex queries 190
How to work with common table expressions 192
How to code a CTE 192
How to code a recursive CTE 194
Perspective 196
t




Murach's SQL Server 2005

Learn more about this book

View the table of contents

Add this book to your cart



Our Ironclad Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a full refund...no questions asked.