REPLACE ( char, search_string [, replace_string]) 如果没有指定replace_string 变量的值,那么当发现search_string 变量的值时,就将其删除
1.替换
update EMAIL set MAILSUBJECT =replace(MAILSUBJECT,'UAT',REMARKS||' UAT') where docID='0000002955' and PARTINDEX!=0;
2.不设置第三个参数,等于删除
--23被删除
select replace('abcdefg','abc') from dual;
select replace('abcdefg','abc') from dual;
result: