一、mysql关联表批量修改
UPDATE sp_sys_dictionaries_category a #根据对应id,把b.username的值赋给a.username LEFT JOIN sp_sys_dictionaries b ON b.cid = a.id SET a.username = b.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
时间: 2024-11-05 21:49:55