mysql联合查询更新数据库例子,用户表,部门表,把用户表中的部门属性更新为部门表的主键UPDATE user_table AS utINNER JOIN belongdept AS bd ON bd.`name`=ut.`belongDept`SET ut.`belongDept` =bd.id