Re: Deleting Duplicates
Date: 27 Jul 92 14:42:28 GMT
Message-ID: <5483_at_m1.cs.man.ac.uk>
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
|> University Computing Systems
|> University of Scranton
|> LITTLEC1_at_JAGUAR.UOFS.EDU Scranton, PA 18510
My first guess, but it can fail.
you need to do "create table <b> as select distince from <a>;" "delete * from <a>;" "insert into <a> select * from <a>;"
or use one of the row deleting queies in one of the messages of this newsgroup.
-- RICK DIPPER, Unix Systems Administrator rick_at_uk.ac.man.cs Department of Computer Science, University of Manchester 061-275-5725 .............................Meemberrr the of Fumblee Ingers Culb..............Received on Mon Jul 27 1992 - 16:42:28 CEST