Re: DELETING IDENTICAL ROWS IN A TABLE

From: Ken <ken_at_fifthd.ca>
Date: 1997/05/30
Message-ID: <338f0691.2330060851_at_news.sas.ab.ca>#1/1


On 30 May 1997 03:43:55 GMT, smantri_at_site.gmu.edu (Shiva K Mantri (CS)) wrote:

>Hi everybody,
>
>How can I delete rows with identical primary key values using SQL commands
>rather than PL/SQL.
>
>----SHIVA
>
We had the same problem
try this.
(The table_name is the same in both cases.)

 delete from table_name t1
 where rowid < (select max(rowid)
 from table_name t2
 where d1.pkey = d2.pkey)

Hope this helps...Ken. Received on Fri May 30 1997 - 00:00:00 CEST

Original text of this message