adspace
what is the difference between count(*) and count(1) ?
Answer Posted / Brijesh Kumar Singh
In SQL Server, both count(*) and count(1) return the number of rows in a result set. However, there's a slight performance difference: count(*) performs better because it doesn't require an expression to be evaluated for each row, whereas count(1) does. This means count(1) will perform a small amount of calculation on every row, making it slightly slower compared to count(*).
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Equi join and non equi join is possible with sql server?
what is the difference between openrowset and openquery?
What are the source of constraints?
What are the properties of the transaction?
How to convert character strings into numeric values?
Can you index views?
Why we use the openxml clause?
What is a scheduled job or what is a scheduled task?
What is sql or structured query language?
What is clustered index
How can we solve concurrency problems?
List out the different types of locks available in sql server?
What is the primary use of the model database?
What is a view in sql?
Can we shrink data file in sql server?