What is the difference between two queries:
1. SELECT * FROM table WHERE 1=1;
2. SELECT * FROM table
Answer Posted / g.nageswara rao
in first query 1=1 always true,then it retrives all columns
in a table.
so,there is no difference in between these two
| Is This Answer Correct ? | 39 Yes | 3 No |
Post New Answer View All Answers
What are the different types of collation sensitivity?
What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?
What is a unique key constraint?
What is normalization? Describe its different types.
What is the use of “join” in sql server?
Suppose i have a table that contains 5 columns like col1,col2...colm5.I want to import only two column through BCP utility.How to do same through BCP in sybase.
Can a database be shrunk with users active?
how to control the amount of free space in your index pages? : Sql server database administration
What is the difference between substr and charindex in the sql server?
How to attach adventureworkslt physical files to the server?
Explain different types of index?
What are the disadvantages of primary key and foreign key in SQL?
What is a fill factor?
How to create new tables with "select ... Into" statements in ms sql server?
Do you know what is replace and stuff function in sql server?