update news set img = replace(img,img,'/upload/'+img+'') where id = 2; //img为字段名
同理,可以采用同样的方法均替换某个字符
第一个参数为 字段名
第二个参数为 需要替换的字段名,或字符串
第三个参数为 替换成的值
发表:2017-11-13 编辑:南昌开优网络 浏览:6151
标签:SQL使用
update news set img = replace(img,img,'/upload/'+img+'') where id = 2; //img为字段名
同理,可以采用同样的方法均替换某个字符
第一个参数为 字段名
第二个参数为 需要替换的字段名,或字符串
第三个参数为 替换成的值