SQL TRANSLATE() Function
SQL TRANSLATE() function return the string/char of every matched character replace with new character. SQL TRANSLATE() function replace individual character at a time.
SQL TRANSLATE() function supported Oracle SQL version
- Oracle 8i
- Oracle 9i
- Oracle 10g
- Oracle 11g
- Oracle 12c
- Oracle 18c
Syntax
TRANSLATE(string, match_char, replace_char)
Parameters
- string is original string.
- match_char is find string from original string.
- replace_char is if match_char character found, replace to replace_char character.
Example
Consider following example return the every matched character replace with new character.
SQL> SELECT REPLACE('Opal Kole','K','D') "TRANSLATE" FROM DUAL;
TRANSLATE
---------
Opal Dole