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


Please Help Members By Posting Answers For Below Questions

How to provide values to stored procedure parameters in ms sql server?

527


How to create stored procedures with parameters in ms sql server?

524


What is an indexing technique?

488


What’s the distinction between dropping a info and taking a info offline?

592


Tell me about joins in database system and explain each in detail.

589






How we can compare two database data?

515


What is the difference between rank and dense_rank?

501


Scalability, Availability, Integration with internet, etc.)?

2431


What is sql service broker?

586


what are database files and filegroups? : Sql server database administration

497


code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that

1752


Please illustrate physical database architecture? : SQL Server Architecture

526


How to filter records of table in SQL SERVER?

596


Explain what is public role in sql server?

577


Does the order of columns in update statements matter?

474