Duplicate Data Delete from Table

 This command will delete duplicate data from any table:

delete from Table-Name a
where rowid <> ( select max(rowid)
from Table-Name b
where ltrim(rtrim(a.column1)) = ltrim(rtrim(b.column1)));

 


 

Muhammad Abdullah Al Noor

Muhammad Abdullah Al Noor, An Oracle Apex Consultants and founder of Noors Technology (www.noorstech.com). Core Expertise : Database Administration, Oracle Forms and Reports Development, Oracle Apex Application Designer and Development, Linux Professional etc. Also the owner of TrainerBD Training and OraDemy E-Learning. WhatsApp +8801790721177

Post a Comment

Previous Post Next Post