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

前端 未结 10 1548
星月不相逢
星月不相逢 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:26

    Cross Join: http://www.dba-oracle.com/t_garmany_9_sql_cross_join.htm

    TLDR; Generates a all possible combinations between 2 tables (Carthesian product)

    (Full) Outer Join: http://www.w3schools.com/Sql/sql_join_full.asp

    TLDR; Returns every row in both tables and also results that have the same values (matches in CONDITION)

提交回复
热议问题