Which two queries return all the rows from COLORS?
Options:
A.
SELECT.
FROM bricks b
RIGHT JOIN colors c
ON b. color _rgb_ hex_ value = c. rgb hex_ value;
B.
SELECT
EROM colors C
LEFT JOIN bricks 上
USING (rgb _ hex_ value) ;
C.
SELECT
FROM bricks b
FULL JOIN colors C
ON b. color rgb _ hex_ value = c. rgb _hex_ value;
D.
SELECT *
EROM bricks | b
JOIN colors C
ON b. color_ rgb_ hex_ value =c. rgb _hex value;
E.
SELECT
EROM colors C
LEET JOIN bricks b
ON b. color_ rgb_ hex value = c. rgb. hex.
value
WHERE b. brick_ id > 0;
Answer:
A, B
Explanation:
Explanation:
The queries that will return all the rows from the COLORS table are those that ensure every record from COLORS is selected, regardless of whether there's a matching record in the BRICKS table:
Option A:
Option B:
Options C, D, and E will not return all the rows from the COLORS table:
Option C: The full join will return all rows from both tables, but it is not restricted to only the rows from COLORS.
Option D: An inner join will return only the matching rows between both tables, not all rows from COLORS.
Option E: This is a left join, which would typically return all rows from COLORS, but the WHERE clause restricts the result set to only those rows from COLORS that have a matching BRICK_ID in BRICKS which is greater than 0, potentially excluding rows from COLORS.