home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!psinntp!vitro.com!v7.vitro.com!fams09
- From: fams09@v7.vitro.com
- Newsgroups: comp.databases.oracle
- Subject: Re: Deleting Duplicates
- Message-ID: <1992Jul24.085912.205@v7.vitro.com>
- Date: 24 Jul 92 08:59:12 -0500
- References: <VN70NB1w165w@iowegia.uucp> <1992Jul23.091611.1@jaguar.uofs.edu>
- Summary: duh
- Keywords: dhooh
- Organization: Vitro Corporation
- Lines: 29
-
- In article <1992Jul23.091611.1@jaguar.uofs.edu>, littlec1@jaguar.uofs.edu (Chris Little) writes:
- > 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.
- >
- > 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)
- /
-
-
-
-
-