Sql Server REPLACE函数的使用

REPLACE
用第三个表达式替换第一个字符串表达式中出现的所有第二个给定字符串表达式。

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

例子:把Tbl_descTem 表dImgThumUrl列,dImgPicUrl列的值中'\'替换成'/'

update dbo.Tbl_descTem set dImgThumUrl=replace([dImgThumUrl],'\','/') ,dImgPicUrl=replace([dImgPicUrl],'\','/')

 

posted @ 2015-05-25 18:05  人间合体  阅读(531)  评论(0编辑  收藏  举报