LEFT JOIN vs. LEFT OUTER JOIN in SQL Server

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

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

12条回答
  •  失恋的感觉
    2020-11-21 14:05

    There are mainly three types of JOIN

    1. Inner: fetches data, that are present in both tables
      • Only JOIN means INNER JOIN
    2. Outer: are of three types

      • LEFT OUTER - - fetches data present only in left table & matching condition
      • RIGHT OUTER - - fetches data present only in right table & matching condition
      • FULL OUTER - - fetches data present any or both table
      • (LEFT or RIGHT or FULL) OUTER JOIN can be written w/o writing "OUTER"
    3. Cross Join: joins everything to everything

提交回复
热议问题