Is there any way to update multiple table in bulk. I found solution for bulk update using single as well as update multiple table using single query. But then looking for a combined solution.
eg: Currently doing like this.
UPDATE a, b, c
SET a.address = "$address", b.address = "$address", c.address = "$address"
WHERE a.id = b.a_id AND a.id = c.a_id AND a.id = 123
UPDATE a, b, c
SET a.address = "$address", b.address = "$address", c.address = "$address"
WHERE a.id = b.a_id AND a.id = c.a_id AND a.id = 234
etc
This is my current script that update every address one by one.
To update multiple entries in single query I can use like,
UPDATE a SET address = CASE
WHEN id = 123 THEN 'address1'
WHEN id = 234 THEN 'address2'
END
Is there any way to combine these queries, to update multiple table as well as multiple rows in single query?
Thanks