SQL Fundamentals

Work with NULL and Unknown Values

Interpret NULL as missing or unknown information, use IS NULL correctly, and predict how three-valued comparisons affect filtered results.

Beginner14 min read
SQL Fundamentals lessonRelational data foundationsPractice

UNTIMED COACHING

Practice before the pressure

Use feedback to correct the model, not merely memorize an option position.

GUIDED PRACTICE

Practice the lesson questions

Answer normal lesson questions without a timer. Every answer includes an explanation, and incorrect answers can be tried again before continuing.

CONCEPT MODELS

See the lesson as a system

Use these visual guides to connect the key ideas before answering the questions.

Connect the roles in Work with NULL and Unknown ValuesKeep null value, comparison outcome, unknown result, and null predicate as separate roles.
Connect the roles in Work with NULL and Unknown ValuesA topic-specific model connects four distinct roles used to reason about work with null and unknown values.
Missing valueData represents no known assignment
Comparison conditionDecision can yield an unknown truth value
Unknown resultResult does not satisfy a WHERE filter
Null checkCheck tests missing values directly
Verify Optional columnConnect optional column with its topic-specific inspection, expected outcome, and protected database boundary.
Verify Optional columnA verification model for work with null and unknown values connects the final data decision to its check, result, and protected boundary.
Column valueData permits a missing relationship value
Starting checkReview column value
Expected resultAccepted nulls correspond to the triage state
Safety boundaryProtect missing value scope