数据库SQL server中 replace使用方法

数据库SQL server中 replace使用方法,第1张

replace使用方法:

REPLACE

(

''string_replace1''

,

''string_replace2''

,

''string_replace3''

)

参数

''string_replace1''

待搜索的字符串表达式。string_replace1

可以是字符数据或二进制数据。

''string_replace2''

待查找的字符串表达式。string_replace2

可以是字符数据或二进制数据。

''string_replace3''

替换用的字符串表达式。string_replace3

可以是字符数据或二进制数据。

返回类型为字符串

如果你的数据库某一个字段(Eg:uid)设置了‘唯一索引’,

在 Thinkphp6 中 用 replace() 添加一条数据 数据库会将原来的数据(uid 相同的数据)先进行删除,再进行添加 *** 作,如果没有加 replace() 方法,在遇到 (uid 相同的数据) 会直接报错,希望可以帮带你。


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/sjk/6777335.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-03-28
下一篇2023-03-28

发表评论

登录后才能评论

评论列表(0条)

    保存