一、mysql关联表批量修改
UPDATE sp_sys_dictionaries_category a #根据对应id,把b.ORGID的值赋给a.FLONGYARN LEFT JOIN sp_sys_dictionaries b ON b.cid = a.id SET b.username = a.username
二、sqlserver关联表批量修改
UPDATE a SET a.FLONGYARN = b.ORGID --根据对应id,把b.ORGID的值赋给a.FLONGYARN FROM ST_LongYarn a LEFT JOIN ST_InspectionRecordOfCaloco b ON b.fid = a.fid
原文:https://www.cnblogs.com/noire/p/11293729.html