What is the difference between two queries:
1. SELECT * FROM table WHERE 1=1;
2. SELECT * FROM table
Answer Posted / hitesh taneja
When we use 1=1 or any condition which is always going to
true, it will take extra bit of time bcoz it is a condion so
althouth the output of the query will be the same the
performance time will be bit higher with condition.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How many databases can we create in a single server?
What is the difference between ddl and dml?
Tell me what is a linked server?
How do I start and stop sql server?
what is the difference between count(*) and count(1) ?
What are the different types of replication are there in sql server 2000?
How to locate and take substrings with charindex() and substring() functions?
What is a covered index?
What changes in the front end code is needed if mirroring is implemented for the high availability? : sql server database administration
What happens to a trigger with multiple affected rows?
What do you mean by SQL injection attack?
How to add more data to the testing table in ms sql server?
What is the difference between left and right outer join?
What is sql server query analyzer?
what is a live lock? : Sql server database administration