Home » SQL & PL/SQL » SQL & PL/SQL » compare two similar tables in different Schemas n the schemas in different databases
compare two similar tables in different Schemas n the schemas in different databases [message #249344] Wed, 04 July 2007 02:41 Go to next message
lavlina
Messages: 3
Registered: July 2007
Junior Member
Hi,

I need to compare two similar tables with same column name but slightly different data. the tables lie in different Schemas n the schemas in different databases. Can ne one suggest a way to do it? I use TOAD. Is there a way in TOAD to do it. I found how to compare schemas in TOAD but not tables...Sad
Re: compare two similar tables in different Schemas n the schemas in different databases [message #249357 is a reply to message #249344] Wed, 04 July 2007 03:12 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
( select 'ONLY IN TAB1', tab1.* from tab1
  minus
  select 'ONLY IN TAB1', tab2.* from tab2
)
union all
( select 'ONLY IN TAB2', tab2.* from tab2
  minus
  select 'ONLY IN TAB2', tab1.* from tab1
)
/

Regards
Michel

Re: compare two similar tables in different Schemas n the schemas in different databases [message #249360 is a reply to message #249357] Wed, 04 July 2007 03:21 Go to previous messageGo to next message
lavlina
Messages: 3
Registered: July 2007
Junior Member
Thanks Michel ..

But my tables are in two different databases ..
I m not able to link how will this work for two different schemas in two different dbs?
Re: compare two similar tables in different Schemas n the schemas in different databases [message #249361 is a reply to message #249360] Wed, 04 July 2007 03:22 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Create a database link.

Regards
Michel
Previous Topic: How to change systimestamp 04-Jul-07 11.11.11.779000 am +05:30 to 04-Jul-07 11.11.11.779000 +05:30
Next Topic: what privileges do we need while using Execute Immediate
Goto Forum:
  


Current Time: Sat Dec 03 13:43:12 CST 2016

Total time taken to generate the page: 0.09607 seconds