Re: Deleting Duplicates
From: Kathy Jou <kjou_at_us.oracle.com>
Date: Wed, 22 Jul 1992 18:00:57 GMT
Message-ID: <1992Jul22.180057.24140_at_oracle.us.oracle.com>
Date: Wed, 22 Jul 1992 18:00:57 GMT
Message-ID: <1992Jul22.180057.24140_at_oracle.us.oracle.com>
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.
delete from table_name
where rowid = any (select rowid from table_name
minus select min(rowid) from table_name group by column_name);
Column_name should be the primary key of the table.
Kathy Jou
Oracle Corporation
Received on Wed Jul 22 1992 - 20:00:57 CEST