Could someone help me on how to convert SQL(PL-SQL) from left join to (+)?
The example of left join as below. I wonder how to convert left join to (+) operation instead?
with a as (select 1 as a1, 1 as a2 from dual union select 1, 2 from dual union select 2, 1 from dual union select 2, 2 from dual),
b as (select 1 as b1, 1 as b2, null as b3 from dual union select 2, 2, 1 from dual union select 2, 2, null from dual)
select * from a left join b on a.a1 = b.b1 and a.a2 = b.b2 and (b.b3 is not null or b.b3 > 0)
if I do the following, the resultset is different,
select * from a, b where a.a1 = b.b1(+) and a.a2 = b.b2(+) and (b.b3 is not null or b.b3 > 0)
Thanks in advance.
expect to convert left join to (+) for the same result.
siennx is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.