Hour 14. Using Subqueries to Define Unknown Data

What You’ll Learn in This Hour:

What a subquery is

The justifications of using subqueries

Examples of subqueries in regular database queries

Using subqueries with data manipulation commands

Embedded subqueries

In this hour, you are introduced to the concept of subqueries. Using subqueries enables you to more easily preform complex queries.

What Is a Subquery?

A subquery, also known as a nested query, is a query embedded within the WHERE clause of another query to further restrict data returned by the query. A subquery returns data that is used in the main query as a condition to further restrict the data to be retrieved. Subqueries are employed with the SELECT, INSERT, UPDATE, and ...

Get Sams Teach Yourself SQL in 24 Hours, Fifth 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.