Chapter 14. Combining Table Expressions
14.1 Introduction
Section 6.4 introduced the term compound table expression. Set operators allow us to combine multiple table expressions into one compound table expression. Examples in Section 6.4 and several other chapters used the set operator called UNION
, which places results of table expressions underneath each other. MySQL supports other set operators besides the UNION
operator:
• UNION
• UNION DISTINCT
• UNION ALL
Chapter 6, “SELECT Statements, Table Expressions, and Subqueries,” defined the table expression and the compound table expression. However, that chapter mentions only the UNION
operator. Now we extend that definition with the complete set of set operators.
Definition
<table expression> ...
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.