It is possible to insert multiple rows like this:
INSERT INTO table VALUES (...), (...), (...)...
But for updating rows by their ID, there is no such shortcut in the UPDATE syntax.
But what about this:
INSERT INTO table (id, columns-to-update) VALUES (1, values), (2, values)
ON DUPLICATE KEY UPDATE column=VALUES(column)...
Is this an effective way to update multiple rows in a single query? Or it is just better overall to issue multiple (up to the hundreds) of individial queries?
Yes, that’s a perfectly valid way to do multiple updates