What is difference between count (*) and count column?



What is difference between count (*) and count column?..

Answer / Budh Prakash Singh

COUNT(*), also known as COUNT_ALL, counts all rows regardless of whether they are null or not. COUNT(column), on the other hand, only counts non-null values in the specified column. If you want to count all rows, it's recommended to use COUNT(*) to avoid unexpected results.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is Service Broker in sql server 2012?

1 Answers   UGC Corporation,


What is the difference between ‘having’ clause and a ‘where’ clause?

1 Answers  


Tell me about the approaches which you used to counter the DI problems.

1 Answers   EXL,


How to query multiple tables jointly?

1 Answers  


Explain ranking functions?

1 Answers  


What will happen if a column containing char type data is changed to the nchar data type?

1 Answers  


When we should use @@error?

1 Answers  


How to create function without parameter in sql server?

1 Answers  


What is difference between stored procedure & function?

3 Answers   CarrizalSoft Technologies, Concept Infoway, TATA,


what are the disadvantages of cursors? : Sql server database administration

1 Answers  


What are tables in sql server?

1 Answers  


What is sqlcmd?

1 Answers  


Categories