TRANSLATE() returns a string where all occurrences of the from_template are replaced with corresponding characters in the to_template.
SQL>
Syntax: TRANSLATE(<string_expression>, <from_template>, <to_template>)
SQL>
SQL>
SQL> SELECT
2 TRANSLATE ('4428-2174-5093-1501'
3 ,'0123456789-'
4 ,'XXXXXXXXXX*') hide_num
5 FROM dual;
HIDE_NUM
-------------------
XXXX*XXXX*XXXX*XXXX
Related examples in the same category