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

mysql 表关联批量更新

时间:2018-10-11 20:04:28      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:批量更新   count   inf   user   use   mys   批量   ext2   ext   

 

项目中最近遇到了需要手动修改某个表的某个字段的数据,但是这个数据是来自别的表,需要关联,所以需要用到关联的批量更新,特此记录一下。

UPDATE t_account_trans_info AS ii
INNER JOIN t_user AS uu ON ii.tran_user_id = uu.id
SET ii.text2 = uu.link_man

where ii.tran_user_id = uu.id 

 

mysql 表关联批量更新

标签:批量更新   count   inf   user   use   mys   批量   ext2   ext   

原文地址:https://www.cnblogs.com/bfyq/p/9774637.html

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