replace跟translate

replace和translatereplace(123123tech, 123)would return techtranslate(1tech23, 123, 456

replace和translate

replace('123123tech', '123');would return 'tech'translate('1tech23', '123', '456');would return '4tech56'translate('222tech', '2ec', '3it');would return '333tith'

:: extact one to on e matching of character like 'a' or '1'
?? replace character is needed
select translate('abc132fdsf','0123456789',' ') from dual;

?

?

-------

abcfdsf

或按以下方式

SQL> select translate('abc132fdsf','#0123456789','#') from dual;

?

-------

abcfdsf

--提取字符串中的数字,字母都被过滤,如下:

?

SQL> select translate('abc132fdsf','abcdefghigklmnopqrstuvwxyz',' ') from dual;

?

?

----

132