\begin{frame}
\frametitle{Union}
\begin{goal}{}
The \sql{union} operand
subqueries must return tables with the same number of columns and compatible data types.
\end{goal}
\remark{%
Columns correspondence is by column \emph{position} (1st, 2nd,\dots).\\
Column names need not be identical.
}
\pause
\medskip
\begin{goal}{}
SQL distinguishes between
\begin{itemize}
\item \sql{union}: with \emph{duplicate elimination}, and
\item \sql{union all}: \emph{concatenation} (duplicates retained).
\end{itemize}
\end{goal}
\pause
\medskip
Other SQL-92 set operations:
\begin{itemize}
\item \sql{except} ($A - B$)
\item \sql{intersect} ($A \cap B$)
\end{itemize}
These do \emph{not} add to the expressivity of SQL.
\begin{quiz}{\textwidth}{}
How?
\end{quiz}
\end{frame}