Sobes.tech
Junior

What is a cross-join?

sobes.tech AI

Answer from AI

CROSS JOIN returns the Cartesian product of the records from two or more tables. This means that each row from the first table is combined with every row from the second table, each row from the third, and so on.

  • Does not require a join condition (ON).
  • The result contains m * n rows, where m is the number of rows in the first table, n is the number of rows in the second.
  • Is used less frequently than other types of JOIN, for example, for generating test data or obtaining all possible combinations.

Example syntax:

SELECT *
FROM table1
CROSS JOIN table2;
What is a cross-join? — QA / QA Automation - sobes.tech