What is the easiest way to update many rows in a table? I have a csv file that looks like this:
|primary_key |value|
| 1 | xyz|
| 2 | abc|
| 3 | def|
...
Rows with these primary keys already exist in the target table
I would like to update the target table with these values. Is there syntax so that I can write something like:
update mytable set value = ('xyz', 'abc', 'def') where primary key = (1,2,3);
Looking through the MySQL Update Reference, this site (MySQL - csv update), SO (update multiple rows, multiple db updates, update multiple rows), I suspect that the answer is "no", but I'd like to confirm that this is true.