When using LOAD DATA INFILE, is there a way to get the same functionality as ON ON DUPLICATE KEY UPDATE for regular INSERT statements?
What I want to do: for each line of my file, if the line does not exist, a new line is added, otherwise the selected fields are updated.
My table has 5 columns: A, B, C, D and E. A is the primary key. Sometimes I have to insert new lines with all the values, but sometimes I have to update only B and C, for example. But the fact is, I want to rearrange all INSERT or UPDATE to the same file.
thanks
source share