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 do I find the sql server version?
Explain cdc and sql injection?
What are the differences between triggers and stored procedures?
How can I get data from a database on another server?
What is the usage of sign function?
What is indexed view?
How to use transact-sql statements to access the database engine?
Explain what is cte (common table expression)?
How we can refresh the view?
Tell me what is normalization? Explain different forms of normalization?
How to create prepared statements using odbc_prepare()?
What is the use of =,==,=== operators?
How to throw custom exception in Stored Procedure?
What are the advantages of using third-party tools?
Explain about protocol layer present in SQL server?