Re: Deleting Duplicates

From: <fams09_at_v7.vitro.com>
Date: 24 Jul 92 08:59:12 -0500
Message-ID: <1992Jul24.085912.205_at_v7.vitro.com>


In article <1992Jul23.091611.1_at_jaguar.uofs.edu>, littlec1_at_jaguar.uofs.edu (Chris Little) writes:
> In article <VN70NB1w165w_at_iowegia.uucp>, bob_at_iowegia.uucp (Bob Powers) writes:

>> How can I delete duplicate rows in a table using SQL*PLUS.  This is
>> an unindexed table and I would like to keep it that way.

>
> I'm relatively new at the job, but I suspect you could create a similar
> table, do an INSERT SELECT UNIQUE from the old table to the new table,
> delete all rows from the old table, copy all rows from the new table
> to the old, and then drop the new one. Maybe there's a better way.
>
> Good Luck.
>
> --
> Chris Little, Programmer/DBA
1)
select...
from abc
for update of..

2) delete from abc y

   where rowid > (select min(rowid)

                  from abc x
                  where y.key_col = x.key_col)
/                    Received on Fri Jul 24 1992 - 15:59:12 CEST

Original text of this message