1. QUOTE OF THE WEEK
Q: I am trying to remove duplicate rows from a database containing 4446 tables and when finished, merge data from that database to an existing database with the same structure. Is there an easy way to remove duplicate rows from all those 4446 tables?
A1: Please tell us "what is a 4446 table?" And, please give examples of duplicate records.
A2: Recreate your database with unique primary keys. 2) Copy records from original database to recreated database, one table at a time. The duplicate records will drop on the floor. 3) Fix the thousands of bugs in your application code that created the duplicate rows in the first place.
A3: I'm creating temporary tables + I add unique index to that table and insert data into and then I rename it to the original one.
--stackoverflow.com