In which case(s) would you use an outer join?

  • The table being joined have NOT NULL columns.
  • The table being joined have only matched data.
  • The columns being joined have NULL values.
  • The table being joined have only unmatched data.
  • The table being joined have both matched and unmatched data.
2 收藏


直接登录
最新评论
  • 萧萧   2016/06/08

    4.

    数据库连接类型有内连接(INNER JOIN),外链接(OUTER JOIN),交叉连接(CROSS JOIN)

    内连接和外连接的最本质的区别在于:内连接返回JOIN条件match的行外连接返回两个表的所有行(不论match与否)。其中外连接又分为左外连接(返回左表的所有行),右外连接(返回右表的所有行)

    连接和有没有空值没有太大关系,所以1和3不太相关。根据内连接和外连接的区别(有match项的,使用内连接和外连接都可以返回结果;没有match项的话,只有外连接才会返回结果),所以4最可能是期望答案