28/73
\begin{frame}
\frametitle{Null Values: Problems}

Since the same null value is used for quite different purposes,
there can be \textbf{no clear semantics.}
\pause

SQL uses a \textbf{three-valued logic} (true, false, unknown)
for the evaluation of comparisons that involve null values.\\
\remark{%
For users accustomed to two-valued logic, the outcome is often surprising.
}

\begin{quiz}{\textwidth}{Which of these queries return rows with \sql{NULL} in column A?}
\begin{enumerate}
\item \sql{SELECT * FROM R WHERE A = 42}
\item \sql{SELECT * FROM R WHERE NOT (A = 42)}
\item \sql{SELECT * FROM R WHERE A = NULL}
\end{enumerate}
\end{quiz}
\pause
None of these queries does!
Use \sql{... WHERE A IS NULL}.
\pause