TRANSLATE function

TRANSLATE replaces a string character by character. REPLACE does the whole string seaching and replacing. TRANSLATE matches characters by character and replace the string character by character. The general format for this function is:

TRANSLATE(string, characters_to_find, characters_to_replace_by)

SQL> SELECT TRANSLATE('This is a test', 's','S') FROM dual;

TRANSLATE('THI
--------------
ThiS iS a teSt

SQL>
Home »
Oracle »
String Functions » 

Related: