What is the difference between two queries:
1. SELECT * FROM table WHERE 1=1;
2. SELECT * FROM table
Answer Posted / pavan
hey! I too agree there wont be any difference in result it
displays but the performance will be different. While
executing the first query the where condition to be checked
for each record it displays hence it takes much time to
execute while compared with question no 2 i.e, without
where condition. this is what I believe in.
| Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
How do you migrate data from mssql server to azure?
How many types of cursor type are there?
Why use triggers?
How do I completely remove sql server instance?
Do you know how to store and query spatial data?
What authentication modes does sql server support?
how to do partition in sqlserver
how will add additional conditions in sql?
can we have a nested transaction? : Sql server database administration
Do you know what is normalization of database? What are its benefits?
What functions can a view be used to performed?
What are the types of lock supported by ?
What is the sql case statement used for?
What is the difference between Clustered and Non-Clustered Index?
Does the order of columns in update statements matter?