The Difference between COUNT(Column Name) and COUNT(*) is, if your column allows null value and in table you have 5 records with 2 null values in ColumnA. If you use COUNT(ColumnA) it will returns 3 and if you use COUNT(*) it will returns 5. So COUNT(Column Name) ignores NULL value.
Archive for the ‘Diff between count(*) and count(columnname)’ Category
Difference between count(*) and count(columnname)
Posted by arrao4u on December 7, 2009
Posted in Diff between count(*) and count(columnname), SqlServer | Leave a Comment »