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.
Answers were Sorted based on User's Feedback
Answer / anil_abbireddy
1. A UNION statement eliminates duplicate rows; a UNION ALL
statement includes duplicate rows.
| Is This Answer Correct ? | 11 Yes | 0 No |
Answer / menan
A UNION statement eliminates duplicate rows; a UNION
ALL statement includes duplicate rows.
| Is This Answer Correct ? | 4 Yes | 0 No |
what is online transaction processing (oltp)? : Sql dba
Is it possible to include an insert statement on the same table to which the trigger is assigned?
How to display Row Number with Records in Oracle SQL Plus?
what are the types of join and explain each? : Sql dba
Is left join same as inner join?
How is data stored on a disk?
How do I remove sql plus from windows 10?
which tcp/ip port does sql server run on? : Sql dba
What is a table?
Differences between UNIQUE and DISTINCT in select statements
26 Answers ABS, DELL, Deloitte, Hewitt, Oracle, Verinon Technology Solutions, Wipro,
Name the tables where characteristics of Package, procedure and functions are stored ?
What language is oracle sql developer?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)