Compare Tables and Delete Enteries
Hi guys, I am hoping you can help -- I am after a script that will compare two columns in different tables ( column data is same eg varchar
column name in prod.docs table is ddocnr and column name in dev.scans is docnr)
and delete rows from the tables if column entry does not exist. To explain better.
Database is version 10gR2
SID name is same eg SID ) same database)
Two tables I want to compare -- prod.docs & dev.scans
I run the following query
SQL> select count(*) from prod.docs;
column name in prod.docs table is ddocnr and column name in dev.scans is docnr)
and delete rows from the tables if column entry does not exist. To explain better.
Database is version 10gR2
SID name is same eg SID ) same database)
Two tables I want to compare -- prod.docs & dev.scans
I run the following query
SQL> select count(*) from prod.docs;
COUNT(*)
----------
146177
SQL> select count(*) from dev.scans;
0