LEFT JOIN vs. LEFT OUTER JOIN in SQL Server

后端 未结 12 1890
失恋的感觉
失恋的感觉 2020-11-21 13:25

What is the difference between LEFT JOIN and LEFT OUTER JOIN?

12条回答
  •  野性不改
    2020-11-21 13:46

    I find it easier to think of Joins in the following order:

    • CROSS JOIN - a Cartesian product of both tables. ALL joins begin here
    • INNER JOIN - a CROSS JOIN with a filter added.
    • OUTER JOIN - an INNER JOIN with missing elements (from either LEFT or RIGHT table) added afterward.

    Until I figured out this (relatively) simple model, JOINS were always a bit more of a black art. Now they make perfect sense.

    Hope this helps more than it confuses.

提交回复
热议问题