I have a column called category_id
and the value can be a number or null (123 or null, for each line). I have to select the total (COUNT) of categories id with null value using:
SELECT COUNT(category_id)
FROM products
WHERE category_id = NULL;
It's returning 0 (wrong value).