This is the fifth most common type of JOIN in SQL. Cross join does not look for matches between any values in the two data sets. Instead for each row in first table every row of second table will be attached to it and added to the final table one by one.
Why use a CROSS JOIN vs a UNION, LEFT JOIN, RIGHT JOIN, INNER JOIN, FULL OUTER JOIN? To help understand, Let’s think about the different questions they are asking.
How many friends and connections do my friends who are on both on Facebook and LinkedIn have?
How many friends and connections do my Facebook friends have? (Regardless of if they are on LinkedIn)
How many friends and connections do my LinkedIn connections have? (Regardless of if they are on facebook)
FULL OUTER join
How many friends and connections do my Facebook friends or LinkedIn connections have?
How many friends do my Facebook friends have and how many connections do my LinkedIn connections have?
How many combinations of friends and connections do I have?
©2019 All Rights Reserved.