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 / menan
A UNION statement eliminates duplicate rows; a UNION
ALL statement includes duplicate rows.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is pl/sql table? Why is it used?
Define sql delete statement.
How can I delete duplicate rows?
Are dml statements autocommit?
Define select, insert, create, delete, update, drop keywords
Can unique keys be null?
how to increment dates by 1 in mysql? : Sql dba
Name the different types of indexes in sql and define them.
How do I find duplicates in a single column in sql?
How do you use join?
differentiate between float and double. : Sql dba
what are the types of join and explain each? : Sql dba
explain the difference between delete , truncate and drop commands? : Sql dba
Can %notfound return null after a fetch?
How to combine two stored procedures in sql?