HI ALL,
I AM FACING THE BELOW PROBLEM AT MY SITE.
select TABLE1.*
from work_db.TABLE11 XLA
inner join
work_db.TABLE2
on ( ( TABLE1.COLUMN1 = TABLE2.COLUMN1
and TABLE1.COLUMN2 = TABLE2.COLUMN2)
or TABLE1.COLUMN3 = TABLE2.COLUMN3);
THE ABOVE QUERY IS PRODUCING A BAD PRODUCT JOIN IN THE EXPLAIN PLAN. I KNOW THAT USING UNION I CAN RESLOVE THIS ISSUE.
CAN WE RE WRITE THIS SQL WITH OUT USING UNION ?
Forums: