Mysql 我想将一列内容添加到同一表中的另一列
我想知道是否可以通过查询将第二列中的两列连接起来 例如:Mysql 我想将一列内容添加到同一表中的另一列,mysql,sql,Mysql,Sql,我想知道是否可以通过查询将第二列中的两列连接起来 例如: Reference | Description ref1 | Des1 ref2 | Des2 ref3 | Des3 结果: Reference | Description ref1 | Des1 ref1 ref2 | Des2 ref2 ref3 | Des3 ref3 函数concat\u ws()执行您想要的操作: select t.*, concat_
Reference | Description
ref1 | Des1
ref2 | Des2
ref3 | Des3
结果:
Reference | Description
ref1 | Des1 ref1
ref2 | Des2 ref2
ref3 | Des3 ref3
函数
concat\u ws()
执行您想要的操作:
select t.*, concat_ws(' ', reference, description)
from t;
您可以将其合并到更新
或计算列中