Re: Help: How could I delete two identical rows from one table?
From: <rtproffitt_at_my-deja.com>
Date: Tue, 14 Dec 1999 16:53:36 GMT
Message-ID: <835smd$ala$1_at_nnrp1.deja.com>
Date: Tue, 14 Dec 1999 16:53:36 GMT
Message-ID: <835smd$ala$1_at_nnrp1.deja.com>
Correlated subquery....
delete all the rows for each "KEY"
which are not equal to the min (or max) rowid.
Delete from tblname a
where ROWID > (
Select MIN(ROWID) from tblname b
where a.key1 = b.key1
and 1.key2 = b.key2....etc)
Robert Proffitt
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Dec 14 1999 - 17:53:36 CET