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 |
Fetch an entire row from the employees table for a specific employee ID:
If the base table structure is changed what will happen to join index????
what is definer rights invoke rights?
How to use sql*plus built-in timers?
Can variables be used in sql statements?
How can I make sql query run faster?
What is dynamic query?
How to connect a sql*plus session to an oracle server?
Write a query to genarate target column.Please answer me. Advance Thanks. Src Tgt Q10 Quarter to 2010 Q90 Quarter to 1990 Q80 Quarter to 1980 Q74 Quarter to 1974
i need department wise top 2 employees salary.which logic i will use
what is a trigger? : Sql dba
In packages the source code is compiled into p code ? how do we describe the p code