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
Write a SQL command to insert and update only a particular field?
How do I find the transaction log size in sql server?
What is transact-sql ddl trigger?
How do you open a cluster administrator?
How do you send email on SQL Server?
What do we need queues in sql service broker?
Suppose you want to implement the one-to-one relationships while designing tables. How would you do it?
What is the data type of time?
Which autogrowth database setting is good?
How to execute function in stored procedure sql server?
How to create “dependant” parameter “make, model, year”
What are the differences between ms sql server & oracle?
What are the advantages of sql azure?
Why are you getting errors when creating a new odbc dsn?
What is the default Port No on which SQL Server listens?