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
Difference between Logical Page and Physical Page in SSRS.
How you provide security to cube? : sql server analysis services, ssas
What is a sql join?
What are the operating modes in which database mirroring runs?
Explain how dts is used to extract, transform and consolidate data?
What is triggers and its types?
What program is used to store the data source file?
You want to be sure that queries in a database always execute at the maximum possible speed. To achieve this goal you have created various indexes on tables which other statement will keep the database in good condition?
How we can compare two database data?
how many triggers you can have on a table? : Sql server database administration
What is resource governor?
What are the restrictions that views have to follow? : SQL Server Architecture
Explain external key management in sql server 2008
How do I find information about the install locations for the various instances running on a computer?
What is SQL Azure Federations?