一、Update

二、多表关联更新

1)例一

update payee_account a,machine b set a.ACCOUNT_ALIAS=b.MACHINE_NAME
where b.line_account = a.login_no;

2)列二

update xcs_user_credit_score a1 inner join xcs_user_credit_score a2    on a1.uid=a2.uid  

  set a1.user_currday_score=a1.user_currday_increment_score+a2.user_currday_score

    where a1.pt_day='2017-09-20' and a2.pt_day='2017-09-19';

 posted on 2018-12-04 15:57  xibuhaohao  阅读(160)  评论(0编辑  收藏  举报