欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Sql Server中REPLACE函數(shù)的使用

 更新時間:2016年01月20日 11:34:30   投稿:mrr  
這篇文章主要介紹了Sql Server中REPLACE函數(shù)的使用的相關(guān)資料,需要的朋友可以參考下

REPLACE

用第三個表達(dá)式替換第一個字符串表達(dá)式中出現(xiàn)的所有第二個給定字符串表達(dá)式。

語法

REPLACE ( ''string_replace1'' , ''string_replace2'' , ''string_replace3'' )

參數(shù)

''string_replace1''

待搜索的字符串表達(dá)式。string_replace1 可以是字符數(shù)據(jù)或二進(jìn)制數(shù)據(jù)。

''string_replace2''

待查找的字符串表達(dá)式。string_replace2 可以是字符數(shù)據(jù)或二進(jìn)制數(shù)據(jù)。

''string_replace3''

替換用的字符串表達(dá)式。string_replace3 可以是字符數(shù)據(jù)或二進(jìn)制數(shù)據(jù)。

返回類型

如果 string_replace(1、2 或 3)是支持的字符數(shù)據(jù)類型之一,則返回字符數(shù)據(jù)。如果 string_replace(1、2 或 3)是支持的 binary 數(shù)據(jù)類型之一,則返回二進(jìn)制數(shù)據(jù)。

示例

下例用 xxx 替換 abcdefghi 中的字符串 cde。

SELECT REPLACE(''abcdefghicde'',''cde'',''xxx'')GO

下面是結(jié)果集:

------------abxxxfghixxx(1 row(s) affected)

相關(guān)文章

最新評論