Zum Hauptinhalt springen

Treat NULL as unknown, not zero

Distinguish NULL from zero, blank text, and false in SQL reasoning.

sql-fundamentals5 min read

NULL makes SQL more honest and more dangerous. It preserves the difference between zero and unknown, but it also means ordinary comparison logic is not enough. A filter keeps true, drops false, and also drops unknown. Joins on nullable keys may fail to match rows that look similar. Aggregates vary: COUNT(*) counts rows, COUNT(column) counts known values. Professionals do not hide NULL by reflex; they decide whether unknown should be excluded, labeled, or transformed.

Read the full lesson

Sign up free: one personalized lesson every day, matched to your role and goals.

← Back to library

Kontakt aufnehmen