Arrao4u

…a blog by Rama Rao

Archive for the ‘Diff between count(*) and count(columnname)’ Category

Difference between count(*) and count(columnname)

Posted by arrao4u on December 7, 2009

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.

Posted in Diff between count(*) and count(columnname), SqlServer | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.