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 |
What is %type in pl sql?
what is the difference between clustered and non clustered index in sql? : Sql dba
How to retrieve a second highest salary from a table? Note:Suppose salaries are in duplicate values eg: Name Sal Malli 60000 Pandi 60000 Rudra 45000 Ravi 45000
10 Answers Mind Tree, Polaris, Sonata,
what is the bond code in materialized view?
types of exceptions and what is meant by pragma autonomous_transaction ?what is the use.
what is commit? : Sql dba
Write a query to find second highest salary of an employee.
how instead of triger is helpful for mutating tables errors handlling ?
define primary key & secondary key?
Explain the commit statement.
What is the difference between cluster and non-cluster index?
What are the different types of joins and explain them briefly.