What does the final query return?
CREATE TABLE t (x INT); INSERT INTO t VALUES (2), (3); SELECT COUNT(*) FROM t WHERE x NOT IN (1, NULL);
- 2
- 0
- 1
- NULL
x <> NULL is unknown, so NOT IN with a NULL in the list is never true and no row qualifies.
Play Problem Solving ▸