Syntax of Cartesian Join

With the WHERE clause

SELECT *
FROM table 1
CROSS JOIN table 2
WHERE condition

Without the WHERE Clause

SELECT table1.column1 , table2.column2...
FROM table1, table2...
CROSS JOIN table2;

Cartesian Join

In SQL, a Cartesian Join is also called a Cross Join, it performs the cartesian product of records of two or more joined tables. A Cartesian product matches each row of one table to every other row of another table, only when the WHERE condition is not specified in the query. In case the WHERE condition is specified then the Cartesian Join works as an Inner Join.

Similar Reads

Syntax of Cartesian Join

With the WHERE clause...

How to Perform Cartesian Join on Tables?

To Perform follow the given steps :...

Conclusion

In this article, we have learned how to perform Cartesian Join or Cross Join on tables of a SQL database. Cartesian Join is important when there is a need to obtain all the combinations of rows present in the tables of a database. Cartesian Join with WHERE clause behaves as a Inner join and without WHERE clause it simply performs cartesian product of all rows of all the tables as mentioned in the SQL query....

Frequently Asked Questions

1. What is a Cartesian Join?...