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 wide table?
When cursors are useful?
If you are given access to a SQL Server, how do you find if the SQL Instance is a named instance or a default instance?
How many types of subqueries are there in sql server?
What is intellisense?
How many types of schemas are there?
How you can add messages to the nt event log from within a stored procedure?
What is difference between Datepart() and Datename() in SqlServer?
What is tabulation?
What is side by side migration in sql server?
1 01 101 01010
Can you move the resources after pausing the node? : sql server database administration
how to take backup bcp out for a column in table in sql server?
Explain what are partitioned views and distributed partitioned views?
What are the fixed server level roles? : sql server security