mysql> select * from aa; +------+ | id | +------+ | 2 | +------+ 1 row in set (0.00 sec) mysql> select * from bb; +------+ | id | +------+ | 2 | +------+ 1 row in set (0.00 sec) mysql> update aa,bb set aa.id=3, bb.id=3 where aa.id=bb.id; Query OK, 2 rows affected (0.02 sec) Rows matched: 2 Changed: 2 Warnings: 0 mysql> select * from bb; +------+ | id | +------+ | 3 | +------+ 1 row in set (0.00 sec) mysql> select * from aa; +------+ | id | +------+ | 3 | +------+ 1 row in set (0.00 sec)