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
Can you explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?
What is the command used to recompile the stored procedure at run time?
What is not null constraint?
How to make a remote connection in a database?
What is the command used to check locks in microsoft sql server?
What is factless fact table? : sql server analysis services, ssas
What is the fillfactor concept in indexes?
What are database states in ms sql server?
can any body tell me how to know the password of current user in sql server
explain different types of backups avaialabe in sql server? : Sql server database administration
What is row_number()?
Can we use custom code in ssrs?
How do I start sql server?
How to drop an existing schema in ms sql server?
What is the purpose of sql profiler in sql server?