
Merging two MySql tables
by bernt & torsten
How to merge two MySql tables that have the same structure and were the primary keys of the two tables will clash.
One option is:
INSERT IGNORE INTO table_1 SELECT * FROM table_2;
which allows those rows in table_1 to supersede those in table_2 that have a matching primary key, while still inserting rows with new primary keys.
Alternatively,
REPLACE INTO table_1 SELECT * FROM table_2;
will update those rows already in table_1 with the corresponding row from table_2, while inserting rows with new primary keys.

Tech Disillusionment
For four decades, I have worked in the tech industry. I started in the 1980s when computing...

A Poem: The Consultant's Message
On a Friday, cold and gray,
The message came, sharp as steel,
Not from those we...

Using AI to Plan Wall Repair and Gutter Installation
In this article, I will share my experience using AI to plan the work required to fix a wall...