What is the difference between `COUNT(column)` and `COUNT(*)` when NULL values are present?

Advanced SQL Developer Medium

Advanced SQL Developer — Medium

What is the difference between `COUNT(column)` and `COUNT(*)` when NULL values are present?

Key points

  • COUNT(column) excludes NULL values
  • COUNT(*) counts all rows, including NULL values
  • Understanding this difference is essential for accurate result interpretation

Ready to go further?

Related questions