32.5k views
0 votes
What is the result of a query that selects from two tables but includes no join condition?

a) A selection of rows from the first table only
b) A selection of matched rows from both tables
c) A Cartesian product
d) A syntax error

1 Answer

2 votes

Final answer:

The result of a query selecting from two tables without a join condition is called a Cartesian product, combining each row of one table with all rows of the other, often resulting in a large and non-meaningful data set. The correct answer is option c)

Step-by-step explanation:

When a query selects from two tables but includes no join condition, the result is a Cartesian product. This means that each row from the first table is combined with each row from the second table, creating a result set that is the multiplication of the row counts of the two tables. Therefore, if table one has 10 rows and table two has 5 rows, the Cartesian product will result in 50 rows. Having no join condition does not result in a selection of rows from the first table only, a selection of matched rows from both tables, or a syntax error. However, usually, a Cartesian product is not a desirable outcome as it can result in a massive amount of data that is typically not meaningful.

User Pebble Unit
by
7.7k points