I want to update a table in a statement that has several joins.
The multi-table UPDATE syntax in MySQL is like blew as sample
The multi-table UPDATE syntax in MySQL is like blew as sample
UPDATE tableA a
JOIN tableB b
ON a.a_id = b.a_id
JOIN tableC c
ON b.b_id = c.b_id
SET b.val = a.val+c.val
WHERE a.val > 10
AND c.val > 10;
No comments:
Post a Comment