CBSE Class 12 Informatics Practices Question 73 of 91

JOINS and SET Operations — Question 9

Back to all questions
9
Question

Question 9

There are multiple ways to create cartesian product of two tables in MySQL. Describe them.

Answer

The two ways to create cartesian product of two tables in MySQL are as follows:

  1. Creating Cartesian Product Without Join Condition:
SELECT * 
FROM table1 JOIN table2;
  1. Creating Cartesian Product Using CROSS JOIN Clause:
SELECT * 
FROM table1
CROSS JOIN table2;