Re: DELETE DUPLICATES

From: Eva Blinder <eblinder_at_panix.com>
Date: 14 Jun 1993 14:53:56 -0400
Message-ID: <1vihg4$2mt_at_sun.Panix.Com>


In <1va9pm$7mc_at_erau.db.erau.edu> mellott_at_db.erau.edu (David Michael Mellott) writes:

>does anyone have a simple script to delete duplicates
>from a table
>I thank you in advance\mike
>.

delete from mytab
where rowid in (select min(rowid) from mytab

                 group  by primary_key
                 having count(*) > 1);

You'll have to run this more than once if you have tripicates, quadruplicates, etc. Received on Mon Jun 14 1993 - 20:53:56 CEST

Original text of this message