Deleting all duplicate rows.
From: Vinay K Gidwani <gidwani_at_alpha1.csd.uwm.edu>
Date: 1996/11/10
Message-ID: <5650dq$al3_at_uwm.edu>#1/1
Date: 1996/11/10
Message-ID: <5650dq$al3_at_uwm.edu>#1/1
I am trying to delete all duplicate rows in a table. The duplicates are to be determined on a few keys. The way I am thinking of implementing it now is
Insert into temp_table as
Select key1, key2, key3 from
table
group by key1, key2, key3
having count(*) > 1
Run a cursor through temp_table and delete all rows having keys key1, key2, key3 in table.
This seems an overly complicated solution. Any suggestions on an easier way to do this.
I have just started to work with Oracle and I would appreciate any suggestions on any good books. I am referring to George Koch Orcale THe Complete Reference which seems to be quite a comprehensive book.
Thanks in Advance.
Vinay.
-- email : gidwani_at_alpha1.csd.uwm.eduReceived on Sun Nov 10 1996 - 00:00:00 CET