Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: !! URGENT - need Help !!
On Sat, 10 Oct 1998 21:07:04 +0100, "Mathias Dehm"
<dehm_at_stud.uni-frankfurt.de> wrote:
>An error occurs while creating an primary key because there are duplicate
>entrys.
>How can i delete these duplicate entrys from these tables ?
delete from my_table my
where my.rowid <
(select my2.rowid
from my_table my2
where my2.primary_key_field = my.primary_key_field
)
Don't forget to create the index on primary_key_field ;-)