What is Cross Join in SQL?

What is SQL Cross Join? Please explain me this database concept with example?


Views: 2275 | Community Opinion: 1

Tags..  SQL Query  Database  SQL Interview

Bookmark this page..



Ask a New Question Go to Home

Community Opinion/Answers
 

A cross join that does not have a WHERE clause produces the Cartesian product of the tables involved in the join. The size of a Cartesian product result set is the number of rows in the first table multiplied
by the number of rows in the second table.

The common example is when company wants to combine each product with a pricing table to analyze each product at each price.

SQL CROSS JOIN syntax:

SELECT * FROM [TABLE 1] CROSS JOIN [TABLE 2]

OR

SELECT * FROM [TABLE 1], [TABLE 2]






What do you think? Add your opinion/answer
*Name
*your opinion/answer: