Reputation: 189
I have a question about the using of (+)= in the where clause in Oracle database;
a. id= b.id(+)
Does that mean a left join that a left join on b where a.id=b.id, right?
a.Job_Type(+) = 'Manager'
I don't understand why he uses (+)= here, but not a.Job_Type = 'Manager', are they the same?
Upvotes: 1
Views: 6287
Reputation: 3005
The (+) identifies the table that is being outer joined to. The way I was taught, the (+) indicated the table that would have missing rows for which new NULL rows had to be added.
If you look at the alternate left outer join syntaxes that various databases supported before LEFT OUTER JOIN became part of the ANSI standard, the proprietary operator was generally applied to the table that was "missing" rows. DB2 also supports the (+) operator for outer joins in the same way that Oracle does.
Upvotes: 0
Reputation: 193
it works like LEFT JOIN and RIGHT JOIN depending on the table that column belong to you can read about different types of JOINS here
in your case (+) will return the all records from table which has alias a and only those records from table which has alias b that intersect with table alias a.
Upvotes: 2