Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 54

Which two are true about queries using set operators (UNION, UNION ALL, INTERSECT and MINUS)? (Choose two.)

    Correct Answer: C, E

    The queries using set operators (UNION, UNION ALL, INTERSECT, and MINUS) need to have an equal number of columns in each SELECT list to ensure that the result can be properly combined or compared across different sets. Additionally, the FOR UPDATE clause cannot be specified with these set operators since FOR UPDATE is used to lock rows and set operators are meant for combining or comparing result sets, which makes them incompatible.

Discussion
jfc1Options: BE

Set operations cannot be performed on BLOB, CLOB, BFILE, VARRAY, or nested table columns. BCE is the Answer

ArslanAltaf

B,C & E All correct

jm9999Options: CE

Union all works with clob.

hmatinnnOptions: CE

Should be C and E. Tried it out !

ShrimathiOptions: CE

CE is the answer None of the set operator can be used with CLOB -False The set operator which is excluding duplicate rows (intersect,minus,union) will fail to compare the LOB data type. Union all operator doesn't throw any error if it contains LOB datatype

johannfurma

The docu states: "The set operators are not valid on columns of type BLOB, CLOB, BFILE, VARRAY, or nested table."

holdfaststrongly

BCE per link.

Averagenoob

BCE it is for sure

TATSSSSOptions: BC

CB The set operators are not valid on columns of type BLOB, CLOB, BFILE, VARRAY, or nested table. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/The-UNION-ALL-INTERSECT-MINUS-Operators.html#GUID-B64FE747-586E-4513-945F-80CB197125EE

SangiiiOptions: AC

B: this option is wrong. we can use UNION ALL with 2 tables having columns with CLOB datatype. But we cannot use UNION,INTERSECT and MINUS SET operators as it performs removal of duplicate and sorting implicitly and could not work with CLOB.

alelejaja

Hi, but in official doc from oracle, i found: The set operators are subject to the following restrictions: The set operators are not valid on columns of type BLOB, CLOB, BFILE, VARRAY, or nested table. The UNION, INTERSECT, EXCEPT, and MINUS operators are not valid on LONG columns. If the select list preceding the set operator contains an expression, then you must provide a column alias for the expression in order to refer to it in the order_by_clause. You cannot also specify the for_update_clause with the set operators. You cannot specify the order_by_clause in the subquery of these operators. You cannot use these operators in SELECT statements containing TABLE collection expressions.

MariGareOptions: BC

B should be included into the TRUE answer: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/The-UNION-ALL-INTERSECT-MINUS-Operators.html#GUID-B64FE747-586E-4513-945F-80CB197125EE The set operators are subject to the following restrictions: The set operators are not valid on columns of type BLOB, CLOB, BFILE, VARRAY, or nested table. The UNION, INTERSECT, and MINUS operators are not valid on LONG columns. If the select list preceding the set operator contains an expression, then you must provide a column alias for the expression in order to refer to it in the order_by_clause. You cannot also specify the for_update_clause with the set operators. You cannot specify the order_by_clause in the subquery of these operators. You cannot use these operators in SELECT statements containing TABLE collection expressions.

gyanji

https://docs.oracle.com/database/121/SQLRF/queries004.htm#SQLRF52341

Artur1991Options: BC

Checking provided link, valid are BCE

nhquoc1990

Union All can use with BLOB. checked