2021年4月1日星期四

Compare two tables and return differences in django / rest_framework

I have two tables on different servers. both the table has same fields. how to to compare the table in order to ensure that the data is synced and both the server have the same data? in case of mismatch i need to add the missing data in third table. to clarify it further

  • table1: emp_name, roll_no, (table on main server)
  • table2: emp_name, roll_no. (table on standby server)

i need output of the records that are in table1 but not in table2. and i will store the missing records in table3 like.

-missing_record_list: emp_name, roll_no.

i have almost 200k records. i am writing this program in django.

https://stackoverflow.com/questions/66908908/compare-two-tables-and-return-differences-in-django-rest-framework April 02, 2021 at 01:14AM

没有评论:

发表评论