时间:2021-07-01 10:21:17 帮助过:3人阅读
UPDATE user_online_month_atu a INNER JOIN ( SELECT user_id, sum(c.online_times) as totalSum, LEFT(c.log_date,length(c.log_date) - 2) as date FROM user_online_time_atu c GROUP BY c.user_id ,date ) b ON a.user_id = b.user_id AND a.`month`=b.date SET a.online_time = b.totalSum
mysql update select 从查询结果中更新数据
标签:user 更新 from ota mon select 数据 pre mes