近期有需求要替换某些新闻中的部分关键词,但是数据类型是ntext,无法直接使用REPLACE,但是可以通过转换后再替换的方法解决,如下:
update 表名 set 字段名=replace(convert(varchar(8000),字段名), ‘要替换的字符 ‘, ‘替换成的值 ‘)
Latest posts by Zhiming Zhang (see all)
- istio Ingress Gateways - 十一月 25, 2020
- Istio VirtualService - 十一月 23, 2020
- istio 组件 - 十一月 18, 2020