David - If your tables aren't too large, you can do something like:

delete from table1
where col1 not in (select col1 from table2);

If you have many rows, you may want to use a variation on this to reduce the
transaction size.

Like:
delete from table1 
where col1 not in (select col1 from table2) and rownum < 1000;
commit;
repeat until all rows are deleted.

Repeat until 
Dennis Williams
DBA, 40%OCP
Lifetouch, Inc.
[EMAIL PROTECTED] 


-----Original Message-----
Sent: Wednesday, January 15, 2003 7:04 PM
To: Multiple recipients of list ORACLE-L


Is it a way to compare two tables to see the differences?  We have problem
with our database, someone input new data into database that causes problem,
we want to find and remove those entries from that table.

Thanks,
David 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Nguyen, David M
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: DENNIS WILLIAMS
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to