Oracle SQL - Using REPLACE function

Introduction

REPLACE function returns a string that every occurrence of the pattern_to_find is replaced with pattern_to_replace_by.

The general format for this function is:

REPLACE(source_string, pattern_to_find, pattern_to_replace_by) 

Demo

SQL>
SQL>-- from  w  w  w.  ja va  2  s.  com
SQL> SELECT REPLACE('Mississippi', 'pi', 'PI') FROM dual ;

REPLACE('MI
-----------
MississipPI

SQL>

Related Topic