mysql下的将多个字段名的值复制到另一个字段名中(批量更新数据)字符串拼接cancat实战例子

mysql下的将多个字段名的值复制到另一个字段名中(批量更新数据)
mysql字符串拼接cancat实战例子:

mysql update set 多个字段相加,如果是数字相加可以直接用+号(注:hundred,ten,one字段 为int类型):
update `ssc`.`historydata` set `last3` = hundred+ten+one

如果是把几个字段的内容当成字符串拼接可以使用CONCAT函数:
update `ssc`.`historydata` set `last3` = concat(hundred,ten,one)

上一篇:纯css实现轮播图


下一篇:简单的理解 StringBuffer/StringBuilder/String 的区别