What is the difference between the following two sql
statements
select count(*) from <tablename>
select count(col_name) from <tablename>
Answer Posted / sandeep
select count(*) from <tablename>
- return number of records from table
select count(col_name) from <tablename>
- return number of records where col_name is NOT NULL
- Null value is eliminated by an aggregate or other SET
operation.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
How to check if stored procedure is running in sql server?
How to configure odbc dsn with different port numbers?
How to create nested stored procedure?
What is the difference between locking and multi-versioning?
What is user defined datatypes and when you should go for them?
What is snapshot replication?
Explain sub-query?
what is a self join? : Sql server database administration
How to convert numeric expression data types by assignment operations?
What are the different editions available in sql server 2000?
How can you insert null values in a column while inserting the data?
How to use union to merge outputs from two queries together in ms sql server?
How to rebuild master databse?
Explain temporary table vs table variable by using cursor alternative?
What is a periodical index?