Re:Deleting duplicate rows

From: Iván Mingot Latorre <ivan_at_si.uji.es>
Date: 1995/11/23
Message-ID: <30B42AB2.3068_at_si.uji.es>#1/1


The best way to get rid off duplicates is using ROWID.

Ejem:

delete from table t
where t.rowid <> (select max(t2.rowid)

                  from table t2
                  where t2.primary_key =3D t.primary_key);


I hope this help you.

Regards.

  • =
                             |\/\/\/|      ___________________________
                             |      |     (                           )
                             |      |     (      Multiplicate por     )
                             | (o)(o)     (          cero!!           )
                            C      _)     (___________________________)
                             | ,___|  ___ /
                             |   /
______________________o00o__/----\__o00o________________________________
Iv=E1n Mingot Latorre                 |
Project Manager  &   D.B.A          |
Servei d`inform=E0tica                |     e-mail: ivan_at_si.uji.es
Campus de Penyeta Roja              |
Universitat Jaume I                 |     http://llevant.uji.es/~mingot
Castell=F3n 12071 - Spain             |
                                    |
PHONE : 964 34 58 75                |
        964 34 56 80 (Ext 4118)     |      Un cordial saludo.
FAX   : 964 34 58 46                |
                                    |                 Iv=E1n.
________________________________________________________________________
Received on Thu Nov 23 1995 - 00:00:00 CET

Original text of this message