Chapter 12
Delving Deep with Nested Queries
In This Chapter
Pulling data from multiple tables with a single SQL statement
Comparing a value from one table with a set of values from another table
Using the SELECT statement to compare a value from one table with a single value from another table
Comparing a value from one table with all the corresponding values in another table
Making queries that correlate rows in one table with corresponding rows in another table
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 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.