Replace & Translate Functions
REPLACE(expr, from_string, to_string) ... 將會置換"整個"from_string到"整個"to_string
select replace('a1234bcd','123','xxx') from dual;
result: axxx4bcd
TRANSLATE(expr, from_string, to_string)....將會置換from_string中字元到to_string中字元
select translate('a12bc34bcd','123','xxx') from dual;
result: axxbcx4bcd
select replace('a1234bcd','123','xxx') from dual;
result: axxx4bcd
TRANSLATE(expr, from_string, to_string)....將會置換from_string中字元到to_string中字元
select translate('a12bc34bcd','123','xxx') from dual;
result: axxbcx4bcd