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 materialized view. What are different methods of refresh?
Is microsoft sql free?
What is prepared statement in sql?
What is a file delimiter?
Define the select into statement.
what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba
What does select count (*) mean in sql?
what is the difference between primary key and unique key? : Sql dba
What are the features of pl sql?
Is full outer join same as cross join?
what is table? : Sql dba
What is the difference between an inner join and an outer join?
How to pronounce postgresql?
how to return query output in html format? : Sql dba
Explain the significance of the & and && operators in pl sql.