How can we classify employees who have no manager?
WHEN column IS NULL inside CASE handles missing or unassigned foreign keys with descriptive labels.
Executive hierarchy classification, identifying unassigned work orders, null handling.
SELECT
name,
CASE
WHEN manager_id IS NULL THEN 'Top Level'
ELSE 'Has Manager'
END AS hierarchy_level
FROM employees;Practice typing production-grade SQL code for CASE with NULL.