Subqueries in MySQL


 

Part of Robert Sheldon’s continuing series on Learning MySQL. The series so far:

Getting started with MySQL Working with MySQL tables Working with MySQL views Working with MySQL stored procedures Working with MySQL stored functions Introducing the MySQL SELECT statement Introducing the MySQL INSERT statement Introducing the MySQL UPDATE statement Introducing the MySQL DELETE statement

With that in mind, let’s dive into the subquery and take a look at several different ones in action. In this article, I focus primarily on how the subquery is used in SELECT statements to retrieve data in different ways from one table