如何把数据库的某个字段更新为另一个字段

update SBD_RETURN_BILL set RB_IS_CONFIRM=1,RB_CONFIRM_DATE=@RB_CONFIRM_DATE,RB_CONFIRM_ORG=@RB_CONFIRM_ORG,RB_CONFIRM_ID=@RB_CONFIRM_ID,RB_SIGN_DATE=(select SW_CREATE_DATE from  SBD_WAYBILL where SW_ID=RB_SB_ID)

update a 
set a.ty2=b.ty1
from t2 a,t1 b
where a.n2=b.n1

  

原文地址:https://www.cnblogs.com/sunxi/p/4251254.html