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 |
Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?
How much does a sql dba make? : SQL DBA
What are the ddl commands?
if we give update table_name set column_name= default. what will happen? its given in pl sql block.what will hapen?
What is the best sql course?
Why procedure is used in sql?
How many levels can subqueries be nested in a FROM clause?
what is meant by urlencode and urldocode? : Sql dba
What is the difference between instead of trigger and after trigger?
how to check server status with 'mysqladmin'? : Sql dba
Can we relate two different tables from two different users in ORACLE,PL/SQL?
how to enter characters as hex numbers? : Sql dba