Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: HELP! How to identify and remove duplicate records
In article <8u266q$bo2$2_at_coco.singnet.com.sg>,
kowho_at_singnet.com.sg (Ho) wrote:
> How to identify and remove duplicate records using PL/SQL ?
>
> Many thanks for your help in advance.
>
>
Ok, I know it's been answered, but just for fun here's another way:
delete from mytable
where rowid not in (
select max(rowid) dont_killme
from mytable
group by criteria1, criteria2,...,criteriaN
)
[This picks the largest rowid from each set of duplicate records and leaves it un-deleted]
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Nov 16 2000 - 18:17:40 CST
![]() |
![]() |