Move rows between tables, avoid duplicate and update auto increment value.
Table “books” and “books_tmp” is identical. “books” table is production state.“books_tmp” is sandbox/testing/pre-production state. Data comes in csv files >> dumped to “books_tmp” >> checked, sorted, etc. >> good data moved to “books”, row by row. Before moved, “books_tmp” data is checked for duplicates in “books”, using ISBN (unique).Upon inserted into “books”, (auto increment) id is checked for duplicate, if…
Read More »