QuestionQ158

VerifiedManaging Schema Objects

Examine the description of the PRODUCTS table:

Question Image

Examine the description of the NEW_PRODUCTS table:

Question Image

Which two queries execute successfully?

Choose two
Explanation

Oracle compound queries require corresponding select-list expressions to have matching column counts and compatible datatype groups. A NULL expression can assume the corresponding expression’s datatype, so the two-column UNION ALL with exp_date and NULL is valid. The three-column UNION is also valid because the character columns are compatible and the DATE and TIMESTAMP values are compatible datetime expressions. A character expression cannot be combined with a numeric literal, and each component query must return the same number of columns.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!