Re: delete duplicates, how?

From: Adam Tadjkarimi <adamt_at_hsltd.com>
Date: Thu, 11 Feb 1999 17:44:38 -0600
Message-ID: <79vpqf$54t$1_at_newsin-1.starnet.net>


DELETE FROM a_tab t1 where EXISTS
  (SELECT 'X' FROM a_tab t2

      WHERE t1.a_col = t2.a_col .....
      AND       t1.rowid > t2.rowid);

Hilsener,
Adam Tadj
adamt_at_hsltd.com

Opinions expressed or questions asked are mine not of my employer.

Rune Lysbakken wrote in message <36c28c6b.388959_at_news.online.no>...
>I want to create an unique index but I have some duplicate values. I
>think I can find them with a combination of count, group and having
>Count ()> 1 but how can I delete so that only one of the duplicates
>remains? Use rowid perhaps?
>
>regds Rune
Received on Fri Feb 12 1999 - 00:44:38 CET

Original text of this message