今天在修改sql中接触到了replace,和大家分享一下


  replace('stat1','stat2','stat3')

 例:select  replace ('111222333444','222','888') from dual;

 输出为 '111888333444'


参数
stat1(将要更改的字符串: 被搜索的字符串。可为任意长度。


stat2(被替换掉的字符串: 要搜索并被 stat3 替换的字符串。该字符串的长度不应超过 255 个字节。如果 stat2是空字符串,则按原样返回原始字符串。

stat3(替换字符串: 该字符串用于替换 stat2。可为任意长度。如果stat3 是空字符串,则删除出现的所有 stat2。



【转】ASCII码对应表chr(9)、chr(10)、chr(13)、chr(32)、chr(34)、chr(39)   http://www.mamicode.com/info-detail-169435.html