-2
我有两个表A和BI正在使用左连接和查询将返回两列电话,CID像这样如何将值从一列分配给mysql中的另一列?
select B.phone
, A.cid
from B
left
join A
on A.id_cc_card = cc_card.id
where A.cid is null
phone cid
5656565 null
4546565 null
现在我的问题是我要指派手机的价值用mysql这样
到CIDphone cid
5656565 5656565
4546565 4546565
任何帮助,将不胜感激。
参见COALESCE()。 – Strawberry
为什么问两次相同的问题https://stackoverflow.com/questions/46629692/how-to-update-value-from-one-column-to-another-in-left-join-query-result/46629811#46629811 –