1z0-071 Exam QuestionsBrowse all questions from this exam

1z0-071 Exam - Question 54


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

Show Answer
Correct Answer: CE

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

12 comments
Sign in to comment
jfc1Options: BE
Jan 13, 2023

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

jm9999Options: CE
Sep 29, 2023

Union all works with clob.

ArslanAltaf
Apr 16, 2024

B,C & E All correct

Averagenoob
Sep 7, 2022

BCE it is for sure

holdfaststrongly
Sep 21, 2022

BCE per link.

ShrimathiOptions: CE
Jul 31, 2023

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
Dec 30, 2023

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

hmatinnnOptions: CE
Jan 14, 2024

Should be C and E. Tried it out !

Artur1991Options: BC
Sep 5, 2022

Checking provided link, valid are BCE

nhquoc1990
Sep 8, 2022

Union All can use with BLOB. checked

gyanji
Nov 25, 2022

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

MariGareOptions: BC
Aug 8, 2023

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.

SangiiiOptions: AC
Aug 24, 2023

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
May 29, 2024

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.

TATSSSSOptions: BC
Mar 18, 2024

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