mysql 局部替换列匹配的字符串

UPDATE tb1 SET t_name = REPLACE(t_name,'123','345') WHERE id > 10; 

替换表 tb1 里 id 大于10 的 t_name 列中的123,换成345

UPDATE tb1 SET t_name = REPLACE(t_name,'123','345') WHERE id > 10; 
 

猜你喜欢

转载自blog.csdn.net/cocos2dGirl/article/details/118152548