MYSQL GROUP_CONCAT 用法

update stockout_order,(SELECT stockout_order.stockoutOrderId, GROUP_CONCAT(sku.systemCode ORDER BY stockout_order.stockoutOrderId,sku.systemCode asc) systemCodes from 
stockout_order INNER JOIN stockout_order_detail on stockout_order.stockoutOrderId= stockout_order_detail.stockoutOrderId 
    INNER JOIN sku on stockout_order_detail.skuId=sku.skuId WHERE stockout_order.stockoutOrderId in(192488,125063,126117,126420) 
GROUP BY stockout_order.stockoutOrderId ) a 
set stockout_order.systemCodes=a.systemCodes WHERE stockout_order.stockoutOrderId=a.stockoutOrderId

你可能感兴趣的:(MYSQL GROUP_CONCAT 用法)