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



What is the main difference between a UNION statement and a UNION ALL statement? 1. A UNI..

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

What is the main difference between a UNION statement and a UNION ALL statement? 1. A UNI..

Answer / 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

More SQL PLSQL Interview Questions

Fetch an entire row from the employees table for a specific employee ID:

2 Answers  


If the base table structure is changed what will happen to join index????

2 Answers  


what is definer rights invoke rights?

1 Answers  


How to use sql*plus built-in timers?

0 Answers  


Can variables be used in sql statements?

0 Answers  






How can I make sql query run faster?

0 Answers  


What is dynamic query?

0 Answers  


How to connect a sql*plus session to an oracle server?

0 Answers  


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

5 Answers   Infosys,


i need department wise top 2 employees salary.which logic i will use

17 Answers  


what is a trigger? : Sql dba

0 Answers  


In packages the source code is compiled into p code ? how do we describe the p code

3 Answers  


Categories