How to delete duplicate lines from Table

delete from my_table t1
 where  exists (select 'x' from my_table t2
                 where t2.key_value1 = t1.key_value1
                   and t2.key_value2 = t1.key_value2
                   and t2.rowid      > t1.rowid

Comments

Popular posts from this blog

Oracle Shipping Network SQL Query

Oracle Ar Invoice Numbering Sequence alter to avoid missing in between by cache

Advance Supply Chaining Scripts - ASCP Full Pegging Concept Script