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 |
How do I quit sql?
What is sql in java?
what are the tunnig tables you used for tuning a query and tell me some of coloumns in that tuning tables?
What are aggregate and scalar functions?
How can you fetch first 5 characters of the string?
why we go for package? what are the advantages of using instead of seperate procuderes or functions
What is sqlexception in java?
What is multiple partition?
Define commit?
What is application trigger?
What are user defined functions?
how to give permission to users that users can update/insert/delete on a row of table on timeing 10am to 6pm only?
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)