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
How to encrypt Strored Procedure in SQL SERVER?
How will you hide an attribute? : sql server analysis services, ssas
How to update a field in SQL after ALTERING a row?
Explain syntax for viewing trigger?
Mention a few common trace flags used with sql server?
How can you stop stored procedures from recompiling?
How to create a view using data from another view?
What are the restrictions that views have to follow? : SQL Server Architecture
what is database replicaion? What are the different types of replication you can set up in sql server? : Sql server database administration
How you can add messages to the nt event log from within a stored procedure?
How to rename an existing table with the "sp_rename" stored procedure in ms sql server?
What it means to be triggered?
How do I delete a sql server database?
You have to store user responses of ‘yes’ and ‘no’ what kind of data type is best suited for this task?
Is it possible to update the views? If yes, how, if not, why?