What is the difference between two queries:
1. SELECT * FROM table WHERE 1=1;
2. SELECT * FROM table
Answer Posted / skumar
Both are returns the SAME results.
I dont know the meaning of the
SELECT * FROM Table_Name WHERE 1=1
SELECT * FROM Table_Name WHERE 2=2
SELECT * FROM Table_Name WHERE 5=5
SELECT * FROM Table_Name WHERE 100=100
.
.
.
etc..,
It accepts the where both are equal.
If you give like
SELECT * FROM Table_Name WHERE 100=1001
It is not accept.
| Is This Answer Correct ? | 34 Yes | 1 No |
Post New Answer View All Answers
Is it safe to delete log files?
What is a hint?
List the types of recovery model available in sql server?
Tell me what is fill factor?
What is normalization and denormalization in sql server?
What are partitioned views?
Describe triggers features and limitations?
What is wide table?
What are the Advantages of using CTE in sql server?
What is spid in sql server profiler?
Issues related in upgrading SQL Server 2000 to 2005 / 2008
What is 1nf 2nf and 3nf?
Tell me what do you mean by an execution plan? Why is it used? How would you view it?
What is de-normalization in sql database administration? Give examples?
What is the difference between inner join and equi join?