Re: Eliminating duplicates

From: John Gillespie <jgg_at_waldo.corte-madera.geoquest.slb.com>
Date: 26 Apr 1994 15:50:06 GMT
Message-ID: <2pjd7e$dml_at_k2.San-Jose.ate.slb.com>


|> : Is there a way to remove duplicate records from a table?
|>
  <snip>

|> How about:
|>
|> Create table newtable
|> as
|> select distinct (field1, field2, field3... fieldn)
|> from oldtable
|> /
|> drop oldtable
|> /
|> rename newtable to oldtable
|> /
|> This is an easy enough trick to use, and also releases the free space used by
|> the extra rows added in the original table; the resulting newtable is only as
|> large as allocated (or needed to hold the data).
|>
|> Regards,
|>
|> Dave Rathbun
|>
Watchit! If you have a LARGE table, chances are you will run out of extents with this method. The other methods which have been posted here are better for aircraft-carrier-sized tables. Dave's solution works for smaller floatilla. Received on Tue Apr 26 1994 - 17:50:06 CEST

Original text of this message