Joins · SQL SQL
Consider two tables: A with 5 rows and B with 4 rows. If you perform a CROSS JOIN between A and B without any WHERE clause, how many rows will the re…
Practice question from Joins (SQL SQL), with the correct answer and a step-by-step solution.
easy · MCQ · Q-98D4D4
Consider two tables: A with 5 rows and B with 4 rows. If you perform a CROSS JOIN between A and B without any WHERE clause, how many rows will the resulting dataset contain?
- A.1
- B.9
- C.20Correct answer
- D.Depends on matching columns
Solution
A CROSS JOIN produces the Cartesian product of the two tables. The number of rows in the result is the product of the number of rows in each table ().
More from Joins
- What is the primary difference between an INNER JOIN and a LEFT OUTER JOIN in ANSI SQL?
- What will be the behavior of a FULL OUTER JOIN between Table X and Table Y if there are rows in Table Y that do not match any rows in Table…
- Explain the semantic difference between placing a condition in the ON clause versus the WHERE clause when performing a LEFT OUTER JOIN.
- Which of the following queries demonstrates a self-join?
Practise more SQL
Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.
Start practising freeFree to start · No credit card needed