Breaking News

Editors Picks

Friday, December 9, 2011

how to find and delete duplicate records in oracle

 // For Select duplicate records

select *
from table_Name
group by key1, key2 having count (*) > 1;


// For   delete duplicate records

delete from test a
where rowid <> ( select max(rowid)
from test b
where a.sno = b.sno
and a.sname = b.sname )

No comments :

Post a Comment

Contact Us

Name

Email *

Message *