Chapter 6. SELECT Statements, Table Expressions, and Subqueries
6.1 Introduction
Earlier we introduced the SELECT
statement and the table expression. You use both of these language constructs for querying data. Within SQL, a few other related constructs exist, such as the subquery and select block. All these constructs have a strong mutual relationship, which makes it difficult to keep them apart. However, the person who is programming SQL must know the differences. That is why we have devoted this entire chapter to this subject. For each construct, we describe what is meant exactly and what the mutual relationships are.
We begin with the SELECT
statement. In the previous chapters, you have already seen several examples of this statement.
Get SQL for MySQL Developers: A Comprehensive Tutorial and Reference 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.