sql根据条件更新

update T_CBKACCO_TMP as  a 
   set BAL = (select  BAL from T_CBKACCO_TMP1 as b where b.ACCTNO = a.ACCTNO)
  where  exists(select  1 from T_CBKACCO_TMP1 as b where b.ACCTNO = a.ACCTNO)

猜你喜欢

转载自blog.csdn.net/liuhao2415/article/details/39780221