1.replace 函数 语法:replace(char, search_string, replacement_string) --针对字符串替换 功能: 将char中的字符串替换. 当replacement_string为空时,剔除search_string. select replace('fasdfasdf','fk','j') as col from dual; -- fasdfasdf select replace('fdasfasdd','as','jjj') as col
SQL> select data,translate(data,'0123456789','##########') as num1, replace(translate(data,'0123456789','##########'),'#','') as num2 from v; DATA NUM1 NUM2 -------------------- ---------- -------------------------------------------------------------