I am trying to copy data from one database into another. Essentially, I have 2 databases.
- Customer (which has ID, Name, DOB, Address)
- Full Customer (which has ID, PHOTO, SIGNATURE)(expanding to include Name, DOB, Address)
All customers are stored in the Customer database (10 million records), but only some are stored in the "Full Customer" database. (5 million records).
I want to copy all the Customer records into the Full Customer database where there is no record currently.
My pseudo code is below for programming, but i am wondering if i can do this directly with mysql
for customer in customers:
if customer.ID not in (select ID from fullcustomer)
insert customer into fullcustomer