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 does stuff differ from the replace function?
Distinguish between nested subquery and correlated subquery?
How to set database to be single_user in ms sql server?
What happens if the update subquery returns no rows in ms sql server?
What is difference between order by and group by?
What is the difference between the 2 operating modes of database mirroring?
Is it possible to have clustered index on separate drive from original table location?
How to create a new schema in a database?
Which command is used for user defined error messages?
As per your opinion what are the five top responsibilities of a dba? : sql server database administration
What are the differences between stored procedure and the dynamic sql?
What factors you will consider calculating the storage requirement for that view?
Why do you want to join software field as you have done your BE in Electronics?
How to enter date and time literals in ms sql server?
How to read data in a table with "select" statements?