What does (+) do in Oracle SQL?

前端 未结 4 1681
孤独总比滥情好
孤独总比滥情好 2020-12-06 20:24

I\'m using Oracle SQL Developer to query an Oracle DB (not sure which version it is) and I\'m going to use the SQL I make for a Crystal report. Many of the reports the prev

4条回答
  •  温柔的废话
    2020-12-06 20:30

    That represents a “right outer join” (right because the = is on the right side of the +).

    SELECT *
    FROM TableA, TableB
    WHERE TableA.PrimaryKey(+) = TableB.ForeignKey
    

    is equivalent to

    SELECT *
    FROM TableA
    RIGHT OUTER JOIN TableB
      ON (TableA.PrimaryKey = TableB.ForeignKey)
    

提交回复
热议问题