Re: Deleting all duplicate rows.

From: Ian Parkin <twod_at_roxy.sfo.com>
Date: 1996/11/10
Message-ID: <565btn$qtl_at_ramona.sfo.com>#1/1


Vinay K Gidwani (gidwani_at_alpha1.csd.uwm.edu) wrote:
: 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

This is in the FAQ - Hmm, interesting I was thinking of the one archived in Melbourne, Australia but it looks as if we have another - http://www.onwe.co. za/frank/faqpream.htm (guess it'll save me the price of a postcard to Oz).

To answer your question (cut 'n' pasted from the FAQ), one solution is :

  • snip -- How can I eliminate duplicates values in a table?

SQL> DELETE FROM table_name A WHERE ROWID > (   2 SELECT min(rowid) FROM table_name B   3 WHERE A.key_values = B.key_values); -- snip --

IAP Received on Sun Nov 10 1996 - 00:00:00 CET

Original text of this message