The errata list is a list of errors and their corrections that were found after the product was released.
The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.
Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update
| Version |
Location |
Description |
Submitted by |
Date submitted |
| O'Reilly learning platform |
Page Ch. 14:Fear of the Unknown : Mini-Antipattern: NOT IN (NULL)
Last paragraph |
I am writing to suggest a small technical correction for Chapter 14, "Fear of the Unknown," specifically in the "Mini-Antipattern: NOT IN (NULL)" section's last paragraph.
First of all, I would like to share that I am currently reading your book with my team members. We are having a wonderful time exploring the insights together and having deep discussions on each chapter. It has become a highlight of our study sessions.
During one of our recent discussions, we noticed a small logical inconsistency in the following explanation:
## Location
In the explanation following the expansion of the NOT IN predicate:
"Now you should see that NOT (status = NULL) will still be unknown, and using AND to combine that with the other term makes the whole expression unknown for any row evaluated."
## Point of Contradiction
The statement "unknown for any row evaluated" is technically inaccurate under the rules of SQL Three-Valued Logic (3VL). While it is true that the query will never return any rows, the logical evaluation result is not always UNKNOWN.
When evaluating the expression NOT (status = NULL) AND NOT (status = 'NEW'), the result depends on the value of the status column as follows:
# 1. If status = 'NEW':
- NOT (UNKNOWN) AND NOT (TRUE)
- UNKNOWN AND FALSE
- Result: FALSE (Since FALSE is the dominant value in an AND operation).
# 2. If status = 'OPEN' (or any other non-NULL/non-NEW value):
- NOT (UNKNOWN) AND NOT (FALSE)
- UNKNOWN AND TRUE
- Result: UNKNOWN
# 3. If status = NULL:
- NOT (UNKNOWN) AND NOT (UNKNOWN)
- UNKNOWN AND UNKNOWN
- Result: UNKNOWN
# Suggested Revision:
To maintain technical rigor, I suggest revising the sentence to something like:
"...makes the whole expression **either FALSE or UNKNOWN** for any row evaluated. ..."
Even though the practical outcome (zero rows matched) remains the same, distinguishing between FALSE and UNKNOWN helps readers fully grasp the nuance of 3VL.
Thank you again for providing such an insightful and enjoyable resource for the SQL community. It has sparked many great conversations within our team, and we look forward to finishing the rest of the book!
|
George Yoshida |
Jan 11, 2026 |