When the DB2_COMPATIBILITY_VECTOR registry variable is set to support the outer join operator, (+), queries can use this alternative syntax within predicates of the WHERE clause.
The outer join syntax should be used wherever possible, and the outer join operator should be used only when enabling applications from other relational database vendors on DB2®.
SELECT * FROM T1
LEFT OUTER JOIN T2 ON T1.PK1 = T2.FK1
AND T1.PK2 = T2.FK2
is equivalent to: SELECT * FROM T1, T2
WHERE T1.PK1 = T2.FK1(+)
AND T1.PK2 = T2.FK2(+)
SELECT * FROM T1
RIGHT OUTER JOIN T2 ON T1.FK1 = T2.PK1
AND T1.FK2 = T2.PK2
is equivalent to: SELECT * FROM T1, T2
WHERE T1.FK1(+) = T2.PK1
AND T1.FK2(+) = T2.PK2
A set of predicates separated by AND operators is known as an AND-factor. If there are no AND operators in a WHERE clause, the set of predicates in the WHERE clause is considered to be the only AND-factor.
SELECT ... FROM T1,T2,T3
WHERE T1.a1 = T2.b2(+)
AND T2.b2 = T3.c3(+)
AND T3.c3 = T1.a1(+) -- invalid cycle
This example
starts with T1 as the outer table in the first predicate and then
cycles back to T1 in the third predicate. Note that T2 is used as
both the NULL-producer in the first predicate and the outer table
in the second predicate, but this usage is not itself a cycle.