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

Examine the description PRODUCTS table:

Examine the description of the NEW_PRODUCTS table:

Which two queries execute successfully?

    Correct Answer: B, E

    To determine which queries execute successfully, the structure and compatibility of the columns in each SELECT statement must be examined. Query A will fail because it attempts to SELECT different numbers of columns in the UNION ALL operation. Query B will execute successfully because it selects matching columns with compatible data types. Query C will fail due to an incorrect number of result columns. Query D will fail due to data type mismatch in the INTERSECT operation. Query E will execute successfully because it selects all columns from both tables, which are compatible in this context.

Discussion
SantiBZ_07032022_1744Options: BE

B,E create table products (prod_id char(2), prod_name char(4), exp_date timestamp(6)); create table new_products (prod_id char(4), prod_name varchar2(10), exp_date DATE); /*A NOOK 01789. 00000 - "query block has incorrect number of result columns"*/ SELECT prod_id FROM products UNION ALL SELECT prod_id, prod_name FROM new_products; /*B OK.*/ SELECT prod_id, exp_date FROM products UNION ALL SELECT prod_id, NULL FROM new_products; /*C NOOK 01789. 00000 - "query block has incorrect number of result columns"*/ SELECT * FROM products MINUS SELECT prod_id FROM new_products; /*D NOOK 01790. 00000 - "expression must have same datatype as corresponding expression"*/ SELECT prod_id, prod_name FROM products INTERSECT SELECT 100, prod_name FROM new_products; /*E OK*/ SELECT * FROM products UNION SELECT * FROM new_products;

WingLOptions: BE

BE Correct. Tested Thanks Santi.

ESZOptions: BE

BE correct. Please update these answers

fasolazgrochemOptions: BE

BE tested

ShrimathiOptions: BE

BE correct

yaya32Options: BE

BE correct

lucemqyOptions: BE

BE is correct D is not correct since the data types does not match

Ajinkya_TambeOptions: BE

B, E is correct; but D also executes successfully!!