标题: 基于sql查询结果的批量更新 [打印本页] 作者: java 时间: 2018-5-4 09:49 标题: 基于sql查询结果的批量更新 update d_config a,(SELECT d_config_id as dConfigId, count(d_config_id) as hots FROM d_config_time where create_time >=date_sub(CONCAT(CURDATE(),' 00:00:00') ,interval 90 day) group by d_config_id) b set a.hots=a.level+b.hots, a.update_time = now()