select count(*) vs count(1) in sql server database

COUNT(SomeColumn) will only return the count of rows that contain non-null values for SomeColumn. 

COUNT(*) and COUNT('Foo') will return the total number of rows in the table.

Other else no such big difference between them.....  

Comments

Popular posts from this blog

SQL – Generate decimal numbers sequence for particular number range

File operations in C# (.net)

Ways to SELECT XML string using Nodes and OPENXML()