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 is the process of normalising?
What is clr ddl trigger?
What are database states in ms sql server?
I have triggers,views,functions,stored Procedures for a table. When I am dropping that table which objects are deleted?
Is mysql better than sql server?
How do I open a .db file?
What are the advantages of having an index on the sql server?
While using a cursor, how can you differentiate between a deleted row and a row that has been inserted with null data values?
What are constraints?
What is a print index?
Do you know what are the ways available in sql server to execute sql statements?
What is checkpoint in sql server?
What does ss stand for sexually?
What are the differences between DDL, DML and DCL in SQL?
What is key set driven?