How can we convert empty strings into true SQL NULLs?
NULLIF(a, b) returns NULL if both arguments are equal; otherwise it returns the first argument.
Cleaning empty string imports (''), avoiding division by zero errors (NULLIF(denom, 0)).
SELECT
name,
NULLIF(status, '') AS cleaned_status
FROM employees;Practice typing production-grade SQL code for NULLIF.