|
Re: how to delete duplicate rows from a table [message #8672 is a reply to message #8671] |
Thu, 18 September 2003 03:50 |
Gerald
Messages: 54 Registered: January 2001
|
Member |
|
|
Hi dud,
Well got a solution by clonig the table without the duplicateS ... may be there's something better :)
here's how to do:
we have a table with 3 duplicates:
-----------------------------------
create table TOTO (name varchar2(10) value number);
insert into TOTO values ('Tata','1');
insert into TOTO values ('Tata','1');
insert into TOTO values ('Tata','1');
insert into TOTO values ('Titi','2');
We want it without duplicate:
---------------------------------------
so i clone it and do a double drop and reclone:
CREATE TABLE CLO_TOTO AS select distinct * from TOTO;
drop table TOTO;
CREATE TABLE toto AS select distinct * from CLO_TOTO;
drop table CLO_TOTO;
Funny no ?
Bye Take Care
Gerald
|
|
|
|
|
|
|