2 votes 2 votes what is difference between full outer join and cross product? Databases joins + – deepakhbtu asked Aug 21, 2017 deepakhbtu 1.4k views answer comment Share Follow See 1 comment See all 1 1 comment reply akshay_845 commented Aug 21, 2017 reply Follow Share A cross join produces a cartesian product between the two tables, returning all possible combinations of all rows. It has no on clause because you're just joining everything to everything, A full outer join is a combination of a left outer and right outer join. It returns all rows in both tables that match the query's where clause, and in cases where the on condition can't be satisfied for those rows it puts null values in for the unpopulated fields for further reference https://stackoverflow.com/questions/3228871/sql-server-what-is-the-difference-between-cross-join-and-full-outer-join 1 votes 1 votes Please log in or register to add a comment.
1 votes 1 votes No: the Cartesian product is not the same as SQL FULL OUTER JOIN. For example: if A = {1,2} and B = ∅, then A × B = {1,2} × ∅ = ∅, i.e. the Cartesian product yield the empty set. But, since FULL OUTER JOIN does not require each record in the two joined tables to have a matching record, if B is empty and A is not, FULL OUTER JOIN will still return some rows. However, CROSS JOIN will return the Cartesian product of rows from tables in the join. Source: https://math.stackexchange.com/questions/668885/is-cartesian-product-same-as-sql-full-outer-join smsubham answered Aug 21, 2017 smsubham comment Share Follow See all 0 reply Please log in or register to add a comment.