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

What is NOT NULL Constraint in sql server 2012?

768


How to connect to a sql server using odbc_connect()?

867


Explain about Normalization?

818


What is set nocount on?

711


Difference between Logical Page and Physical Page in SSRS.

414


What is measure group, measure? : sql server analysis services, ssas

796


What is database replication? What are the different types of replication you can set up in sql server?

691


How to create a view with data from multiple tables?

797


What are different types of statements that are supported by sql?

807


What is db stored procedure?

642


How will you decide the active and passive nodes?

817


How to disconnect from a sql server using mssql_close()?

810


How to copy the tables, schema and views from one sql server to another?

769


What is a domain constraint give an example?

812


What is scan table/view and seek table/view when its occurs? : sql server database administration

771