How does SQL treat NULL in comparisons?medium
Answer
NULL represents unknown, so comparisons like = NULL do not evaluate to true.
Explanation
Use IS NULL or IS NOT NULL. NULL also affects joins, filters, aggregates, and three-valued logic, so explicit handling prevents subtle bugs.
Follow-upHow do COUNT(*) and COUNT(column) handle NULL differently?