sql批量更新指定行数据到目标行
如下:
UPDATE t1 SET t1.bank_name = t2.bank_name, t1.account_num = t2.account_num , t1.protocol_end =t2.protocol_end FROM finance_sp_vendor t1,finance_sp_vendor_temp t2 WHERE t1.account_name = t2.account_name
解释 一下:
我需要将 finance_sp_vendor_temp表中的供应商信息更新到finance_sp_vendor表中对应名称的行上去