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.
Answer Posted / anil_abbireddy
1. A UNION statement eliminates duplicate rows; a UNION ALL
statement includes duplicate rows.
Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
Is sql between inclusive?
what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba
How does one use sql*loader to load images, sound clips and documents? : aql loader
is mysql query is case sensitive? : Sql dba
What is percent sign in sql?
what is the difference between clustered and non clustered index in sql? : Sql dba
What is the difference between the conventional and direct path loader? : aql loader
What is Difference Between Unique and Primary Key Constraints?
what is heap table? : Sql dba
What is pl sql quora?
What is plpgsql language?
What are the two types of periodical indexes?
i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this
What is the difference between count 1 and count (*) in a sql query?
What are different types of functions in sql?