I have data in a MySQL table with a unique key. I want to import more recent data that is stored in a CSV at the moment. I would like it to overwrite the old data if the key already exists, or create a new row if the key does not exist. Does anyone know how to this in MySQL?
Thank you for your help!
Jeff
Use
INSERT ... ON DUPLICATE KEY UPDATE.