Difference between RIGHT & LEFT JOIN vs RIGHT & LEFT OUTER JOIN in SQL [duplicate]

南楼画角 提交于 2019-11-26 22:14:14

问题


This question already has an answer here:

  • LEFT JOIN vs. LEFT OUTER JOIN in SQL Server 12 answers

What is the difference in results between:

  1. RIGHT JOIN and RIGHT OUTER JOIN
  2. LEFT JOIN and LEFT OUTER JOIN ?

Can you please explain it through some examples?


回答1:


There is no difference between RIGHT JOIN and RIGHT OUTER JOIN. Both are the same. That is, LEFT JOIN and LEFT OUTER JOIN both are the same.

Visual Representation of SQL Joins




回答2:


Here's a very nice Visual Explanation of joins generally by our very own Jeff Atwood. A right outer join is the same as a right join, and left join and left outer join are also the same.




回答3:


Nice explanation of SQL Join:

Reference: link




回答4:


What is result difference between:

RIGHT JOIN and RIGHT OUTER JOIN

No difference.

LEFT JOIN and LEFT OUTER JOIN ?

No difference.

Simply put, the OUTER keyword is optional. You can include it or omit it without affecting the resultset.




回答5:


  • SQL Server Forums - Differences between Left join & Left outer join

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=53046

  • LEFT JOIN vs. LEFT OUTER JOIN

http://itknowledgeexchange.techtarget.com/itanswers/left-join-vs-left-outer-join/

  • PL/SQL - What is the difference between right join and right outer ...

http://www.geekinterview.com/question_details/53637




回答6:


  • "Join" is union of two or more tables (entities) with all data.
  • "Outer" is union of two or more tables except the attributes used for union


来源:https://stackoverflow.com/questions/3183669/difference-between-right-left-join-vs-right-left-outer-join-in-sql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!