Chapter 12

Delving Deep with Nested Queries

In This Chapter

arrow Pulling data from multiple tables with a single SQL statement

arrow Comparing a value from one table with a set of values from another table

arrow Using the SELECT statement to compare a value from one table with a single value from another table

arrow Comparing a value from one table with all the corresponding values in another table

arrow Making queries that correlate rows in one table with corresponding rows in another table

arrow Determining which rows to update, delete, or insert by using a subquery

One of the best ways to protect your data’s integrity is to avoid modification anomalies (see Chapter 5 for the gory details of those) by normalizing your database. Normalization involves breaking up a single table into multiple tables, each of which has a single theme. You don’t want product information in the same table with customer information, for ...

Get SQL For Dummies, 8th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.