
如果有两列id1和id2的值显示,那么mysql是否可以将这两列(添加两个字段)连接成第三个id。
(在excel中很容易做到这一点-使用一个公式,从excel表的两列中取值,然后在第三列中执行计算)。谢谢
发布于 2016-08-04 15:02:59
是的,你能做到。
select firstCol, secondCol, concat(firstCol, secondCol) as thirdCol
from table name发布于 2016-08-04 15:02:59
你可以这样做:如果你想拼接字符串,你可以这样做:
update table set id = concat(id1,id2);如果您想要添加:
update table set id = (id1+id2);https://stackoverflow.com/questions/38760492
复制相似问题