Which statement is true regarding the UNION operator?

Which statement is true regarding the UNION operator?

Which statement is true regarding the UNION operator?

A.
By default, the output is not sorted.

B.
NULL values are not ignored during duplicate checking.

C.
Names of all columns must be identical across all SELECT statements.

D.
The number of columns selected in all SELECT statements need not be the same.



Leave a Reply 12

Your email address will not be published. Required fields are marked *


Bina

Bina

Why D is wrong. I thought same # of columns must be needed for union.

Nikita Gupta

Nikita Gupta

number and datatypes has to be same..

Shweta Singh

Shweta Singh

No. of columns and the datatypes of the column being selected must be identical in all the Select statement used in the query.

andrews

andrews

Why A is wrong?

andrews

andrews

By default output sorted in the asc order of the first column of the select clause
NULL values are not ignored
Number of columns and data types need to be identical,names need not to identical

ashwanth

ashwanth

Option B is correct.
By default output is sorted in the ascending order of the first column of the select clause
Null values are ignored
Names need not to be identical
The number of columns AND DATA TYPES selected in the select clause need to be same

charu

charu

For Option A :- By default the output get sorted while using Union.

charu

charu

Option D is also true regarding Union

Leandro

Leandro

read again “The number of columns selected in all SELECT statements NEED NOT BE the same.”

The number of columns NEED BE the same

Isa

Isa

What about C?
C also correct I think

Tom

Tom

No. C is wrong. DATATYPE of each column must be the same (correctly: similar), no its name.