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

Answer Posted / malathi

Both the Queries will return the same ouput.
That means it will return all the rows that are available
in the table.

Is This Answer Correct ?    45 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the steps to process a single select statement?

514


Explain about protocol layer present in SQL server?

611


What is merge statement?

629


What is named query? : sql server analysis services, ssas

519


What is difference between aggregate and analytic function?

484






What is for xml in sql server?

542


How can I know what locks are running on which resource?

511


what are defaults? Is there a column to which a default can't be bound? : Sql server database administration

623


What is the command to change the recovery model?

571


What are the types of indexes?

599


How to drop existing indexes in ms sql server?

593


Write a query to include a constraint, to check whether the employee salary is greater than 5000?

1125


What is the default value of an integer data type in sql server 2005?

589


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

594


Do you know what is similarity and difference between truncate and delete in sql?

579