I know this doesn’t work:
UPDATE `states` SET `country_id` = '83', `position` = (1,2,3) WHERE `states`.`id` IN (381, 378, 380);
Is there a way to update the row based on
id = 381; position = 1
id = 378; position = 2
id = 380; position = 3
Thanks.
The simplest is to use three separate queries.
It is possible with a single query, but more complicated: