数据库字段关联更新

时间:2014-08-15 22:26:49   收藏:0   阅读:234

MS SQL Server 子查询更新:

update log set uin= b.uin from log a,logs b where a.accountuin = b.accountuin

mysql 更新:

update t_stat_month_user a INNER JOIN t_dept b on a.op_dept=b.op_id set a.dept_short_name=b.dept_short_name;

数据库字段关联更新,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!