Difference between count (*) and count (field name) in SQL
This article uses examples to describe the differences between count (*) and count (field name) in SQL. For details, refer to examples.
I did not pay attention to the difference between the two in the past. Reading the blog garden articles really caught my attention.
Data Testing: see Figure
Select count (*) c1, COUNT (ADDRESS) c2 FROM test
Obviously, count (*) counts the total number of results set, and count (field name) counts the total number of records where the field value is not null.