Let me try to make it as simple as possible.
We have 3 columns here: ID | Title | Content
I have 2 CSV files and I import file 1 with this code:
LOAD DATA INFILE 'file_1.csv' IGNORE
INTO TABLE scrapped
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
It imports successfully. Now I want to import file 2, but I am aware that some of the file 2 has the same "Title" as some of the file 1, but different "ID" and "Content".
How do I make it so, if the file 2 finds the same "Title", instead of inserting it will replace the "Title" with its own "ID" and "Content"?