oracle replace函數(shù)替換多個 SqlServer中REPLACE函數(shù)的使用?
SqlServer中REPLACE函數(shù)的使用?使用SQL Server replace函數(shù)replace將出現(xiàn)在第一個字符串表達式中的所有第二個給定字符串表達式替換為第三個表達式。Syntaxrepl
SqlServer中REPLACE函數(shù)的使用?
使用SQL Server replace函數(shù)
replace
將出現(xiàn)在第一個字符串表達式中的所有第二個給定字符串表達式替換為第三個表達式。
Syntax
replace(“”string”replace1“”、“”string”replace2“”、“”string”Replace3“)
參數(shù)
“”string”replace1“”
要搜索的字符串表達式。字符串ureplace1可以是字符數(shù)據(jù)或二進制數(shù)據(jù)。
“”string “Replace2 “”
要找到的字符串表達式。字符串ureplace2可以是字符數(shù)據(jù)或二進制數(shù)據(jù)。
“”字符串“”替換3 “”
]。字符串ureplace3可以是字符數(shù)據(jù)或二進制數(shù)據(jù)。
Return type
如果字符串替換(1、2或3)是受支持的字符數(shù)據(jù)類型之一。如果字符串替換(1、2或3)是受支持的二進制數(shù)據(jù)類型之一。
Example
以下示例將abcdefghi中的字符串CDE替換為XXX。
選擇replace(“cdefghicde”、“CDE”、“XXX”)go
以下是結(jié)果集:
---abxxxfghixxx(受影響的1行)
此函數(shù)不支持替換文本和ntext字段