Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Find end delete duplicate values?
delete from table_name where rowid not in
(select max(rowid) from table_name group by column);
This 'column' is the column that has duplicate values..
I hope this will help.
Mirana
mailto: mirana.koljatic_at_hep.hr
> I want to create an unique index but I have some duplicate values. I
> think I can find them with a combination of count, group and having
> Count ()> 1 but how can I delete so that only one of the duplicates
> remains? Perhaps I can use rowid? I want a solution that I can use
> with many duplicates without a lot of typing!
>
> regds Rune
>
Received on Mon Feb 08 1999 - 02:09:19 CST