1z0-071 Exam QuestionsBrowse all questions from this exam

1z0-071 Exam - Question 74


Examine the description of the BRICKS table:

Examine the description of the BRICKS_STAGE table:

Which two queries execute successfully? (Choose two.)

A.

B.

C.

D.

E.

Show Answer
Correct Answer:

Based on the descriptions of the BRICKS and BRICKS_STAGE tables and the structure of the queries, the two queries that will execute successfully are A and D. These queries conform to the rules that both the number of columns and the data types of the columns being compared must match for a MINUS operation. The column names do not need to be identical, but the number and data types do. For query A: the first SELECT statement has 'brick_id' (NUMBER) and 'shape' (VARCHAR2), while the second SELECT statement has 'weight' (NUMBER) and 'color' (VARCHAR2). The data types do not match, so this query will not execute successfully. For query D: the first SELECT statement has 'shape' (VARCHAR2) and 'color' (VARCHAR2), and the second SELECT statement has 'color' (VARCHAR2) and 'shape' (VARCHAR2). Despite the different column order, both columns have matching data types, so this query will execute successfully.

Discussion

17 comments
Sign in to comment
Artur1991
Sep 4, 2022

AD are the correct answers

paddy95
Nov 17, 2022

A D create table briks ( brick_id number(38) , shape varchar2(30) , color varchar2(30) , weight number ); create table bricks_stage( weight number , shape varchar2(30) , color varchar2(30)); --A + select brick_id , shape from briks minus select weight, color from bricks_stage; --B - select * from briks minus select * from bricks_stage; -- C - select shape, color from briks minus select weight, color from bricks_stage; -- D + select shape, color from briks minus select color, shape from bricks_stage; --E select shape, color, weight from briks minus select * from bricks_stage;

zouve
Jun 22, 2023

tested twice AD

Sushmasri
Aug 1, 2023

A,D are correct

Orxan_H
Apr 21, 2023

why C inccorect?

fgramos
Jun 12, 2023

Because Shape (1st column, 1st select) is VARCHAR2(20) and the first column of the second query is Weight, type number

super04
Aug 14, 2023

AD is Correct answer. Use Minus operator to return all distinct rows selected by the first query, but not present in the second query result set. In Minus operator, the number of columns must be the same and data type of columns being selected by the SELECT statements in queries must belong to the same data type group in all the SELECT statements used in the query. The names of the columns, however, need not be identical.

Arth1989
Sep 1, 2023

It is no brainer. AD!

HassanMkhlalati
Sep 13, 2023

AD are the correct

Arth1989
Jan 9, 2024

AD, number of columns and order types should match

yaya32
Jan 16, 2024

AD for me

Nelita
Jun 1, 2023

AD ARE CORRECT. The others show errors.

metallers
Oct 20, 2023

AD are the correct answers

Salmanbutt786
Nov 13, 2023

I have tested A,D and E these all are correct.

Salmanbutt786
Nov 13, 2023

B- AND C ARE FALSE B - Return error, coz no of column must be same in both queries. C- will also return error, coz expression must have same datatype in both queries.

lucemqy
Nov 14, 2023

AD should be the correct answer since the data types match with same number of columns

Raja29
Nov 20, 2023

AD are the correct answers

yanoolthecool
Dec 28, 2023

if D works, why wont E?

yanoolthecool
Dec 28, 2023

oh nvm, cuz D have varchar and varchar for both, so the order wont matter. E's wrong cuz it will match a number with varchar, so yea..

ArslanAltaf
Apr 17, 2024

AD is correct. The Data type and number of columns have to be same.

mage2611
Jul 2, 2024

Answer is A, D is not correct because of the ordering of the columns (datatype mismatch)

Ayman_Khalifa
Jul 16, 2024

shape and color both have the same datatype, therefore, ordering doesn't matter