Oracle SQL - Function TRANSLATE function

Introduction

TRANSLATE function replaces a string character by character.

REPLACE looks for a whole string pattern and replaces the whole string pattern with another string pattern,

TRANSLATE matches characters by character within the string pattern and replace the string character by character.

The general format for this function is:

TRANSLATE(string, characters_to_find, characters_to_replace_by) 

Demo

SQL>
SQL>-- from  w w w.  j av a 2s. com
SQL> SELECT TRANSLATE('Mississippi', 's','S') FROM dual ;

TRANSLATE('
-----------
MiSSiSSippi

SQL>