create table duplicates (n int);
insert into duplicates select level from dual connect by level < 100;
insert into duplicates select level from dual connect by level < 50;
delete from duplicates where rowid in (
select rid from (
select rowid rid, first_value(rowid)over(partition by n) frid, dup.*
from duplicates dup
) where frid != rid
From asktom one can find an example removing duplicates. Here is another.
- ► 2012 (33)
- ▼ March (5)
- ► 2010 (37)
- I am Timo Raitalaakso. I have been working since 2001 at Solita Oy as a Senior Database Specialist. I have received Oracle ACE nomination. My main focus is on projects involving Oracle database. In this Rafu on db blog I write some interesting issues that evolves from my interaction with databases. Mainly Oracle.