Cheeky Cockatoo

Life Advice and Stories, Travel, Oracle Tech, Good Food and More

delete_dup_rows.sql

Download Script

delete from &&table_name t1
where (t1.&&column_name, t1.&&column_name2) in 
  (select &&column_name, &&column_name2
   from   &&table_name t2
   where  t1.rowid > t2.rowid
   and    t1.&&column_name = t2.&&column_name
   and    t1.&&column_name2 = t2.&&column_name2
  )
/