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
How can you tell if a database object is invalid?
Different types of keys in SQL?
Does view occupy space?
What happens if null values are involved in bitwise operations?
How to use order by with union operators in ms sql server?
What is a partition key?
What method is used by the Command classes to execute SQL statements that return single values?
plss anybody specify tha constrian management system in dbms
What is b tree index?
What is attribute hierarchy? : sql server analysis services, ssas
What are the difference between clustered and a non-clustered index?
What are the options which must be set to allow the usage of optimistic models?
Write a SQL query in order to merge two different columns into single column?
Explain the difference between functions and stored procedures in sql server?
How to enable/disable indexes?