Answer the question
In order to leave comments, you need to log in
How to synchronize two tables correctly?
Use Python, but the language is not the point here.
There are two identical tables in structure:
+-----+-------+------------+
|ID |Name | Company |
+--------------------------+
|1 | Dmitry|RKS |
|2 | Petr |HTD |
|3 | Misha |CHPU |
+-----+-------+------------+
Answer the question
In order to leave comments, you need to log in
You would specify a DB, it would be easier.
If the tables are in the same database, then it is probably worth revising the application architecture.
In mssql you can use merge.
technet.microsoft.com/en-us/library/bb510625%28v=s...
percona has pt-table-sync
www.percona.com/doc/percona-toolkit/2.1/pt-table-s...
Well, either by hand:
1. through triggers.
2. Add another ID - it must refer to another table.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question