- COUNT() counts all rows returned by the query, including rows with NULL values.
- COUNT(column) counts only rows where the specified column is not NULL.
- Both are used to measure volume but serve different purposes.
- In my project, COUNT() was used to count total transactions.
- COUNT(discount_amount) was used to count orders with discounts applied.
- This distinction helped answer more specific business questions.
- Choosing the right COUNT avoids misinterpreting data.
What is COUNT(*) vs COUNT(column)?
Updated on January 8, 2026
< 1 min read
