What is the main difference between a UNION statement and a
UNION ALL statement?
1. A UNION statement eliminates duplicate rows; a UNION
ALL statement includes duplicate rows.
2. A UNION statement can be used to combine any number of
queries; a UNION ALL statement can be used to combine a
maximum of two queries.
3. A UNION statement can only combine queries that have
parallel fields in the SELECT list; a UNION ALL statement
can combine queries with differing SELECT list structures.
4. A UNION statement cannot be used with aggregate
functions; a UNION ALL statement can be used with aggregate
functions.
5. There is no difference between the two statements; they
are interchangeable.
Answer Posted / anil_abbireddy
1. A UNION statement eliminates duplicate rows; a UNION ALL
statement includes duplicate rows.
Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
What is difference between primary and secondary key?
how can we find the number of rows in a table using mysql? : Sql dba
What is data control language (dcl)?
How to run sql statements through the web interface?
how tsql statements can be written and submitted to the database engine? : Transact sql
What is record data type?
What is the benefit of foreign key?
What is a database? Explain
Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?
What is an invalid partition table?
How to display the current date in sql?
How do I create a sql database?
What will you get by the cursor attribute sql%notfound?
Explain isolation levels. : Transact sql
What is sql analyzer?