多表关联更新update
程序员文章站
2022-03-26 10:10:07
...
参考:https://blog.csdn.net/liqing0013/article/details/96291116
将t_outer_rel表中的OUTER_ID修改为t_outer_rel_qiaofang表中的uuid,where是关联条件:
update t_outer_rel rel, t_outer_rel_qiaofang bak set rel.OUTER_ID = bak.uuid where rel.ORG_ID=80 and rel.TYPE = 1 and rel.OUTER_ID = bak.id;