O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Using Complex Queries and Statements

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required