In previous chapters, you learned how to execute queries to retrieve and modify data in SQL Server. You also learned how to create and use database objects, such as tables, views, stored procedures, user-defined functions, and triggers. Transact-SQL provides extended structures that can simplify the process of writing queries to solve complex requests.
This chapter teaches you the following:
How to create subqueries, which are queries inside other queries, to solve complex problems
How to use the EXISTS keyword to test for existence of rows in a subquery
How to use the IN operator to check for values returned from a subquery
How to use derived tables, which are subqueries that can be used as virtual ...