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

Examine the data in the COLORS table:

Examine the data in the BRICKS table:

Which two queries return all the rows from COLORS? (Choose two.)

    Correct Answer: A, C

    The queries that will return all the rows from the COLORS table are ones that perform a RIGHT JOIN on the colors table or a LEFT JOIN on the bricks table, ensuring that all records from the COLORS table are included regardless of matching records in the BRICKS table. A RIGHT JOIN from the bricks table to the colors table will include all records from the COLORS table, even if there are no matching records in the BRICKS table. Similarly, a LEFT JOIN starting from the COLORS table ensures all records from the COLORS table are included.

Discussion
anzacOptions: AB

Checked: A, B Check: CREATE TABLE COLORS_120 ( RGB_HEX_VALUE VARCHAR2(100) , COLOR_NAME VARCHAR2(100) ); CREATE TABLE BRIKS_120 ( BRICK_ID NUMBER , COLOR_RGB_HEX_VALUE VARCHAR2(100) ); INSERT INTO COLORS_120 SELECT 'FF0000','red' FROM DUAL UNION ALL SELECT '00FF00','green' FROM DUAL UNION ALL SELECT '0000FF','blue' FROM DUAL; INSERT INTO BRIKS_120 SELECT 1,'FF0000' FROM DUAL UNION ALL SELECT 2,'00FF00' FROM DUAL UNION ALL SELECT 3,'FFFFFF' FROM DUAL; A; SELECT * FROM BRIKS_120 b RIGHT JOIN COLORS_120 c ON b.COLOR_RGB_HEX_VALUE = c.RGB_HEX_VALUE; B; SELECT * FROM BRIKS_120 b FULL JOIN COLORS_120 c ON b.COLOR_RGB_HEX_VALUE = c.RGB_HEX_VALUE; C; SELECT * FROM c FULL JOIN BRIKS_120 b USING(RGB_HEX_VALUE); D; SELECT * FROM COLORS_120 c LEFT JOIN BRIKS_120 b ON b.COLOR_RGB_HEX_VALUE = c.RGB_HEX_VALUE WHERE b.brick_id > 0 ; E; SELECT * FROM BRIKS_120 b LEFT JOIN COLORS_120 c ON b.COLOR_RGB_HEX_VALUE = c.RGB_HEX_VALUE;

WingL

thanks for coding.

abdullah_barhamOptions: AB

AB ARE THE ANSWERS

jfc1Options: AB

AB are the answers

amizhOptions: AB

A, B is correct. tried.

amizhOptions: BC

tried it . A,B,C correct

ArslanAltaf

C is not true. look at the common column difference.

yaya32Options: AB

Not possible to use the using clause as the names of the columns are not the same. For me AB is the correct answer.

lucemqyOptions: AB

AB is the correct answer

jm9999

How can the answer key say DE? Not even close.

WingLOptions: AB

A and B are correct.

Orxan_H

Why D incorrect?

a947739

if you remove "where b.brick_id> 0" then D is correct. With the where clause, it only returns two rows.

DarnunOptions: AB

AB are correct ones

dexdinh91Options: AB

AB are correct

cadcadleyOptions: AB

AB is correct