What is the difference between two queries:
1. SELECT * FROM table WHERE 1=1;
2. SELECT * FROM table

Answer Posted / krishna sandeep

Of course, both the Queries will get you the same data but,

When compared to the first case processing time will be
slightly reduced in the second case.

Bytes sent from client and Bytes received from server will
be more in the first case.

and one more thing is better not using "select * from ..."

Is This Answer Correct ?    17 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write an sql query to sort a table according to the amounts in a row and find the second largest amount.

558


What do you understand by triggers and mention the different types of it?

479


What is cached report?

106


What are logical database components? : SQL Server Architecture

475


Explain foreign key in sql server?

573






Give an example of why you would want to denormalize a database

507


What are the types of joins in sql?

555


Define inner join? Explain with an example?

509


What is the usage of the sign function?

524


Can sql servers link to other servers?

557


What are different backups available in sql server?

601


write an SQL query to list the employees who joined in the month of January?

1141


What programming language would you use to create embedded functions in ssrs?

122


How to select all columns of all rows from a table with a select statement in ms sql server?

570


Is it safe to delete log files?

519