REPLACE函数的使用

语法
REPLACE ( ''string_replace1'' , ''string_replace2'' , ''string_replace3'' )
参数
''string_replace1''
待搜索的字符串表达式。string_replace1 可以是字符数据或二进制数据。
''string_replace2''
待查找的字符串表达式。string_replace2 可以是字符数据或二进制数据。
''string_replace3''
 
示例
下例用 xxx 替换 abcdefghi 中的字符串 cde。
SELECT REPLACE(''abcdefghicde'',''cde'',''xxx'')GO
下面是结果集:
---abxxxfghixxx(1 row(s) affected)
posted @ 2021-10-25 16:49  ~且听风吟~  阅读(107)  评论(0编辑  收藏  举报