MySQL--关联更新

## 关联更新
## 注意set条件在WHERE条件之前关联ON条件之后

UPDATE db1.tb001 AS T1
INNER JOIN db2.tb002 AS T2
ON T1.id=T2.id
SET T1.c1=T2.c2
WHERE t1.id>1000

 

posted @ 2019-02-17 17:50  TeyGao  阅读(4940)  评论(0编辑  收藏  举报