Exam 1z0-082 All QuestionsBrowse all questions from this exam
Question 67

Which two are true about a SQL statement using SET operators such as UNION? (Choose two.)

    Correct Answer: A, B

    When using SQL statements with SET operators such as UNION, the data type group of each column returned by the second query must match the data type group of the corresponding column returned by the first query. This means that a column in one SELECT statement can be unioned with a column in another SELECT statement if they belong to the same data type group, such as numeric or character. Additionally, the number of columns in all SELECT statements must be identical, although the names of the columns do not need to match.

Discussion
danitoOptions: AB

A B are the correct options

Ekos

i agree

elbelgounetos

reference https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/The-UNION-ALL-INTERSECT-MINUS-Operators.html#GUID-B64FE747-586E-4513-945F-80CB197125EE

Rivaldo11Options: AB

I would also say A and B - "...Tables must have the same number of columns presented in the same order. In addition, the data type of the corresponding column must be in the same data type group such as number or character..."

avanandOptions: AB

A and B are correct. For SET operator, Data type group should be matched. For example, a NUMBER column in first query can be UNIONed with INTERGER column in second query.

mamaduOptions: AB

I was confused with C and A since A. mentions "data type group". i can confirm that a CHAR can be matched with VARCHAR2. ans is A B

auwiaOptions: AB

A and B are correct

Shinju_dyOptions: AE

In queries using set operators, Oracle does not perform implicit conversion across data type groups. Therefore, if the corresponding expressions of component queries resolve to both character data and numeric data, Oracle returns an error. https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/The-UNION-ALL-INTERSECT-MINUS-Operators.html#GUID-B64FE747-586E-4513-945F-80CB197125EE

Hell3n

why not E?

it6567306

SELECT 1 FROM DUAL UNION SELECT '0' FROM DUAL; --ORA-01790: expression must be of same datatype as corresponding expression

Oracle2020

I think B, C

Oracle2020

sorry the answer is AB. because The select list are identical in the number of expressions in the list and their respective data type groups.

fthusaOptions: AB

AB correct

LeandroHPNOptions: AB

A , B is correct.

ryuahOptions: AB

A,B is correct

you1234Options: CE

C & E is correct answer