码迷,mamicode.com
首页 > 数据库 > 详细

MySQL Update

时间:2018-12-04 17:23:16      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:多表关联   login   day   use   edit   bsp   mysq   ali   incr   

一、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‘;

MySQL Update

标签:多表关联   login   day   use   edit   bsp   mysq   ali   incr   

原文地址:https://www.cnblogs.com/xibuhaohao/p/10064640.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!