inner join (select name,zong from shujv order by month desc Limit 1) B
on A.name=B.name
运行下列sql更新查询即可实现提问中的需求:update order,(select order_id,
sum(goods_num*goods_price) as m
from order_goods group by order_id) b
set order.goods_total=b.m
where order.order_id=b.order_id
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)