In SQL Server, what is the difference between Count(*) and Count(column_name) ?

 Posted by Akiii on 5/31/2012 | Category: Sql Server Interview questions | Views: 2217 | Points: 40
Answer:

Count(*) - Will count all the rows in the specified table

Count(column_name) - returns the number of rows which have a value (NULL values will not be counted)



Thanks and Regards
Akiii


| Alert Moderator 

Comments or Responses

Login to post response