compare same column values in 2 oracle tables that has different structure

I have a similar column in 2 tables call order_id that I want to compare and highlight the differences - meaning if the column order_id is there in table1 and not table2 vice versa if it null highlight no value in table1 and value in table2 - there isn't any primary keys in both tables but we need to compare the columns - how can we go about doing this?
mahjagAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

flow01Commented:
(
select 'only in table1',  order_id from table1 where order_id is not null
minus
select 'only in table1',  order_id from table2 where order_id is not null
)
union
(
select 'only in table2',  order_id from table2 where order_id is not null
minus
select 'only in table2',  order_id from table1 where order_id is not null
)
order by 2,1

This method will show no differences if order_id appears 2 times in table1 and als 1 time in table2
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Devinder Singh VirdiLead Oracle DBA TeamCommented:
Another method.
select distinct t1.p1 from temp_dev2 t1, temp_dev3 t2 where t1.p1 = t2.a(+) and t2.a is null
union
select distinct t2.a from temp_dev2 t1, temp_dev3 t2 where t1.p1(+) = t2.a and t1.p1 is null

        P1
----------
         4
         5
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.