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 main purpose of having conversation group?
what is a join? : Sql server database administration
Can a table have 2 primary keys?
as a part of your job, what are the dbcc commands that you commonly use for database maintenance? : Sql server database administration
What is subquery explain with example?
define and explain the differences between clustered and non-clustered indexes.
do views contain data ?
Which tcl commands are available on the sql server?
Explain the dbcc pintable command when would you use it?
Which table keeps the locking information?
Where to find ntwdblib.dll version 2000.80.194.0?
Is there any difference between primary key and unique with the not null condition?
How do I view a stored procedure in sql server query?
What happens if you are trying to access a schema not owned by you?
Explain full-text query in sql server?