Mysql 一条update语句,更新多张表(存在关联的表)

版权声明:本文为博主搜索整合文章。 https://blog.csdn.net/weixin_37794901/article/details/81060444

 UPDATE table1 

    LEFT JOIN table2 ON table1.xx=table2.xx (关联的字段)

    SET table1.xx=value,table2.xx=value (update value)

WHERE table1.xx=xx (条件)

猜你喜欢

转载自blog.csdn.net/weixin_37794901/article/details/81060444