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.
Explanation:
The SQL UNION query allows you to combine the result sets of two or more SQL SELECT
statements. It removes duplicate rows between the various SELECT statements.
Each SQL SELECT statement within the UNION query must have the same number of fields in the
result sets with similar data types.
This answer is wrong.
The correct is B ( Nulls values are not ignored during duplicate checking)
ALL SQL statement in a query must have same number of columns.
The Explanation put for the answer says that the UNION query must have same number of columns.
A query with a different number of columns returns this error:
ORA-01789:query block has incorrect number of result columns
The correct answer is B. Union operator does not ignore null values.
B is the only one Correct Answer.
La respuesta correcta es la “B”
D is also correct check this out:
select employee_id from employees
union
select employee_id, salary from employees;
this query shows an error: ORA-01789: query block has incorrect number of result columns
but this
select employee_id, salary from employees
union
select employee_id, salary from employees;
works
Greetings email:[email protected]
Sorry I didnĀ“t see the NOT word
Sites of interest we have a link to.
We came across a cool internet site that you simply may possibly delight in. Take a appear for those who want.
B and D is correct answer.
In D option there is “NOT”. Because of it it is true.
D.
The number of columns selected in all select statements need NOT be the same.
Look at http://www.aiotestking.com/oracle/which-statement-is-true-regarding-the-union-operator-7/
there is no not over there on D option. So That is wrong.
Sorry, On this test only B is correct.
And On http://www.aiotestking.com/oracle/which-statement-is-true-regarding-the-union-operator-7/
B and D is correct answer.