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
What’s the distinction between dropping a info and taking a info offline?
How can change procedure in sql server?
What is change tracking in sql server?
What are the main sources of data?
Determine when to use stored procedure to complete sql server tasks?
Explain filestream storage of sql server 2008?
What should be the fill factor for indexes created on tables? : sql server database administration
Define cross join in sql server joins?
Tell me about the approaches which you used to counter the DI problems.
What is log in sql server?
What are the functions in sql server?
What are different types of data sources?
What types of replication are supported in sql server?
Define constraints and give an example of their use?
What are the properties of primary key?