COUNT(*) vs COUNT(Column Name)

 


Summary Comparison
Feature COUNT(*)COUNT(column)
What it countsAll rows in the result set.Only rows with a non-NULL value in the specified column.
Handles NULLsIncludes rows with NULLs.Excludes rows with NULLs.
Primary UseGetting the total record count.Counting data completeness for a specific field.


Comments