mysql 两列数据叠加

 如图所示,需求是我想把两列叠加起来或拼接起来,然后用group by 去重,搜的都是concat ,或group_concat ,或sum函数,不符合需求;

后来请教同事,B哥,union 函数;

 符合需求。

union 函数还自动去重,union all 是不去重的。

原文地址:https://www.cnblogs.com/gxs-future/p/13575623.html