表为A,字段为B
比如mysql中原字段B内容为ab, 添加cd 得以字段为abcd,
如果为字符型直接为
update A表 set B=B+'cd' where 条件
如果为整数型之类的
update A表 set B=rtrim(cast(B as char))+'45' where 条件
减少内容的话可以用replace(B,'cd','')或者update tab set B = concat(substring(B,1,3),'bbb');
表为A,字段为B
比如mysql中原字段B内容为ab, 添加cd 得以字段为abcd,
如果为字符型直接为
update A表 set B=B+'cd' where 条件
如果为整数型之类的
update A表 set B=rtrim(cast(B as char))+'45' where 条件
减少内容的话可以用replace(B,'cd','')或者update tab set B = concat(substring(B,1,3),'bbb');