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
Which are sql * plus commands?
what is 'mysqldump'? : Sql dba
What is the importance of sqlcode and sqlerrm?
what is the stuff function and how does it differ from the replace function? : Sql dba
What is foreign key sql?
List the different type of joins?
Which column in the user.triggers data dictionary view shows that the trigger is a pl/sql trigger?
What are some emotional triggers?
How many sql statements are used?
How do I save a stored procedure?
what tools available for managing mysql server? : Sql dba
Why is %isopen always false for an implicit cursor?
What is cursor and why it is required?
what is user defined functions? : Sql dba
Why do we use triggers?