1Z0-071 practice question 18 of 35

SELECT * FROM bricks,colors; Which two statements are true?

Full set: 326 questions
Answer options
A: You can add an ON clause with a join condition.
B: You can add a WHERE clause with filtering criteria. Correct answer
C: It returns the number of rows in BRICKS plus the number of rows in COLORS.
D: You can add a USING clause with a join condition.
E: It returnsthe same rows as SELECT * FROM bricks CROSS JOIN colors. Correct answer
Correct Answer:
B. You can add a WHERE clause with filtering criteria.; E. It returnsthe same rows as SELECT * FROM bricks CROSS JOIN colors.
Explanation

A comma-separated table list with no predicate produces a Cartesian product identical to the explicit CROSS JOIN syntax. Additional filtering is supplied via a WHERE clause; ON or USING may only accompany ANSI JOIN operators (JOIN … ON/USING) and are invalid with the comma style. Hence adding WHERE is legal; the result set equals that of SELECT FROM bricks CROSS JOIN colors.

Why Incorrect

A. ON can accompany only explicit JOIN syntax, not the comma operator.
C. The Cartesian product returns rows = rows(bricks) × rows(colors), not their sum.
D. USING is likewise available only with explicit JOIN syntax.

References

1. Oracle Database SQL Language Reference 19c – “FROM clause” → “Comma-Separated Joins” and “CROSS JOIN”.

2. Oracle Database SQL Language Reference 19c – syntax diagrams for SELECT showing WHERE allowed after FROM.

3. MIT OpenCourseWare 6.830 – Lecture 3 slides, “Cartesian products in SQL,” equating comma joins and CROSS JOIN.

Scroll to Top