Courtesy of Ari Kaplan of this list:
delete from &&table_name a where rowid > (select min(rowid)
from &&table_name b
where a.&&column_name=b.&&column_name
)
/
this works if only one column is duplicated but you should be able to
change it (concatenate all the columns together?) if you don't
duplicate on just one column
- Alexander Ordonez <aordonez_at_ccss.sa.cr> wrote:
> Hi gurus,
> I need detect and delete duplicate rows in any table, somebody helpme
>
> thanks!!!
>
> @lex
> ------------------------------------------------------------
> Lic. Alexander Ordóñez Arroyo
> Caja Costarricense del Seguro Social
> Soporte Técnico - División de Informática
> Telefono: 295-2004, San José, Costa Rica
> Aordonez_at_ccss.sa.cr Icq# 30173325
>
> ------------------------------------------------------------
> The true is out there in WWW
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Alexander Ordonez
> INET: aordonez_at_ccss.sa.cr
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing
> Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Rachel Carmichael
INET: wisernet100_at_yahoo.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Wed Feb 06 2002 - 12:20:25 CST