I have a table with two columns that might be null (as well as some other columns). I would like to count how many rows that have column a, b, both and neither colu
null
It can be accomplished in Oracle just in 1 row:
SELECT COUNT(NVL(potential_null_column, 0)) FROM table;
Function NVL checks if first argument is null and treats it as value from second argument.