×

Loading...

You can use ROWID to identify two records with same contents, then write a PL/SQL as inside:

wander2001 (wander)
... ...
cursor cur_del is sel * from tab1;
... ...
begin
for cur_1 in cur_del loop
delete from table1
where column1=cur_1.column1
and column2=cur_1.column2
... ...
and columnn=cur_1.columnn
and rowid<>cur_1.rowid;
commit;
end loop;
end;
(#213717@0)
2001-9-30 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: DATABASE: In one table, no primary key, there are two exactly same records. How to delete one of them? tks.

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论