从一个表查数据修改另外一张表的数据
update op_system.ops_system_user a,msip_bhu_core.t_vas_users b set a.bid=b.id where a.username=b.mobileno and a.bid is null; update ops_device_flow a,ops_device_flow b set a.next_uid=b.to_uid,a.status='0' where a.device_sn=b.device_sn and a.to_uid=b.from_uid and b.to_uid<>0 and a.next_uid is null; update ops_system_user a set device_count=(select count(*) from ops_device_flow where to_uid=a.id);
转载请注明原处