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.
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.
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.
AD are the correct answers
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;
tested twice AD
A,D are correct
AD for me
AD, number of columns and order types should match
AD are the correct
It is no brainer. AD!
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.
why C inccorect?
Because Shape (1st column, 1st select) is VARCHAR2(20) and the first column of the second query is Weight, type number
Answer is A, D is not correct because of the ordering of the columns (datatype mismatch)
shape and color both have the same datatype, therefore, ordering doesn't matter
AD is correct. The Data type and number of columns have to be same.
if D works, why wont E?
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..
AD are the correct answers
AD should be the correct answer since the data types match with same number of columns
I have tested A,D and E these all are correct.
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.
AD are the correct answers
AD ARE CORRECT. The others show errors.