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 offset in sql query?
Does truncate remove indexes?
Can we commit inside a trigger?
What does over partition by mean in sql?
What are data types in pl sql?
How do you respond to dementia behavior?
Where the sql database files are stored?
How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?
Can you have more than one key in a database?
What is the need of a partition key?
what is rollback? : Sql dba
What is a temporal data type?
What is $$ in sql?
What is form and report?
Can we alter stored procedure?