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
What is the difference between indexing and hashing?
What is difference between getdate and sysdatetime in sql server 2008?
Can a database be shrunk to 0 bytes, if not, why?
Is it possible to call a stored procedure within a stored procedure?
What is query optimizer in sql server?
What do you mean by recursive stored procedure?
Can you explain different types of locks in sql server?
Explain how to send email from sql database?
What is query processing?
Define full outer join in sql server joins?
what is dbcc? : Sql server database administration
Explain indexing and what are the advantages of it?
What are logical database components? : SQL Server Architecture
How can you find out which stored procedures are recompiling?
How to call stored procedure using http soap?