O'Reilly logo

Joe Celko's SQL for Smarties, 5th Edition by Joe Celko

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14

NULLs—Missing Data in SQL

Abstract

NULLs are how we handle missing and unknown data. They can be in the original data or generated by functions in SQL. NULLs propagate in math and logic.

Keywords

NULL

Dr. E. F. Codd

Fact “real NULLs”

“Created NULLs”

Empty table

Logic

3VL

Łukasiewicz

COALESCE()

NULLIF()

INDICATOR in host language

FOREIGN KEY

discussion of how to handle missing data enters a sensitive area in relational database circles. Dr. E. F. Codd, creator of the relational model, favored two types of missing-value tokens in his book on the second version of the relational model, one for “unknown” (the eye color of a man wearing sunglasses) and one for “not applicable” (the eye color of an automobile). Chris Date, leading ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required