ORACLE学习笔记 translate,REGEXP_replace

时间:2021-04-19 06:38:05

从一串文本中提取数字:

select translate('用纸箱包200/箱',REGEXP_replace('用纸箱包200PCS/箱','[0-9]',''),' ')from dual;

translate 表示用用第三个串替换第二个串的内容,如果第二个串里没有,则保留下来。

translate(第一个,第二个,第三个)