To avoid errors, the inner join or left join is utilised for self join. 2. Cross Join: With a cross join, we may join every row of both tables. It works in the same way as the cartesian product, which combines all the rows.
The CARTESIAN JOIN or CROSS JOIN returns the Cartesian product of two or more connected tables' sets of records. As a result, it translates to an inner join in which the join-condition evaluates to either True or False or when the join-condition is not included in the statement.
The cartesian product in SQL Server is actually a cross-join that returns all the data from all the tables given in the query: each row from the first table is coupled with all the rows from the second table. When there is no relationship defined between the two tables, this occurs.
ANSI-standard INNER, LEFT OUTER, RIGHT OUTER, FULL OUTER, and CROSS are the five forms of JOIN defined by SQL.