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

Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?

0 Answers  


How much does a sql dba make? : SQL DBA

0 Answers  


What are the ddl commands?

0 Answers  


if we give update table_name set column_name= default. what will happen? its given in pl sql block.what will hapen?

5 Answers   iFlex,


What is the best sql course?

0 Answers  






Why procedure is used in sql?

0 Answers  


How many levels can subqueries be nested in a FROM clause?

7 Answers  


what is meant by urlencode and urldocode? : Sql dba

0 Answers  


What is the difference between instead of trigger and after trigger?

0 Answers  


how to check server status with 'mysqladmin'? : Sql dba

0 Answers  


Can we relate two different tables from two different users in ORACLE,PL/SQL?

4 Answers  


how to enter characters as hex numbers? : Sql dba

0 Answers  


Categories