SQL Server: What is the difference between CROSS JOIN and FULL OUTER JOIN?

前端 未结 10 1545
星月不相逢
星月不相逢 2020-11-28 18:38

What is the difference between CROSS JOIN and FULL OUTER JOIN in SQL Server?

Are they the same, or not? Please explain. When would one use either of these?

10条回答
  •  离开以前
    2020-11-28 19:23

    A full outer join combines a left outer join and a right outer join. The result set returns rows from both tables where the conditions are met but returns null columns where there is no match.

    A cross join is a Cartesian product that does not require any condition to join tables. The result set contains rows and columns that are a multiplication of both tables.

提交回复
热议问题