home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!oracle!unrepliable!bounce
- Newsgroups: comp.databases.oracle
- From: kjou@us.oracle.com (Kathy Jou)
- Subject: Re: Deleting Duplicates
- Message-ID: <1992Jul22.180057.24140@oracle.us.oracle.com>
- Followup-To: kjou@oracle.com
- Sender: Kathy Jou
- Nntp-Posting-Host: hqpyr1.us.oracle.com
- Organization: Oracle Corporation, Redwood Shores CA 94065
- References: <VN70NB1w165w@iowegia.uucp>
- Date: Wed, 22 Jul 1992 18:00:57 GMT
- X-Disclaimer: This message was written by an unauthenticated user
- at Oracle Corporation. The opinions expressed are those
- of the user and not necessarily those of Oracle.
- Lines: 16
-
- In article <VN70NB1w165w@iowegia.uucp> bob@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
-
-