count in sql consider null values code example Example: how to count null values in sql SELECT COUNT(1) FROM my_table WHERE my_column IS NULL;