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

Answer Posted / g.nageswara rao

in first query 1=1 always true,then it retrives all columns
in a table.
so,there is no difference in between these two

Is This Answer Correct ?    39 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the new security features added in sql server 2014? : sql server security

755


Why do we use trigger?

710


What is a with(nolock)?

753


You have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem?

766


When I run the sql server 2000 setup, it just hangs. What do I do?

802






I have all the primary data files, secondary data files as well as logs. Now, tell me can I still restore the database without having a full backup? : sql server database administration

878


SQL Server Architecture ?

2128


What authentication modes does sql server support?

756


How to send email from database?

755


How do I find query history in sql server?

672


Can a unique index be created on a column, which contains null?

713


What is SQL Azure Data sync?

115


What is the difference between an index and a unique index?

739


What is sql azure database?

198


What encryption security is available in sql azure?

91