The Difference between 'Count' and 'Count(*)'

Answer Posted / vijay dev saxena

Count(expr) -> returns the number of records in the table
where the expr is not null in the particular column.
Count(*) -> returns the number of all records in the table.
(including duplicates and those with nulls)

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain encryption of entire databases without the need for application changes in sql server 2008?

836


Explain linked server in sql?

910


What is the stuff?

766


Describe and explain about SQL native client?

850


What is the language structure to add a record to a table?

806


What is the difference between NOROW and LOCKROW?

2535


What is the difference between an index and a unique index?

777


How you can move data or databases between servers and databases in sql server?

827


What is a table called, if it has neither cluster nor non-cluster index? What is it used for?

832


How can change procedure in sql server?

764


What is the recursive stored procedure in sql server?

771


How does clustered and non clustered index work?

722


What is difference between clustered and non clustered index?

751


Can you pass expressions to stored procedure parameters?

747


What are the different types of Indexes available in SQL Server?

750