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
Define join and name different types of joins?
Are stored procedures compiled?
How to display the records between two range in Oracle SQL Plus?
What is normalisation and its types?
How to display Row Number with Records in Oracle SQL Plus?
what are null values? : Sql dba
What is primary key and foreign key?
Which function is used to return remainder in a division operator in sql?
table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
Explain ttitle and btitle.
Explain ddl statements in pl/sql?
what is a trigger in mysql? : Sql dba
What is trigger in sql and its types?
What is dml with example?
How do you pronounce sql?