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>--  w w  w  .ja  v  a2s  . c om
SQL> SELECT REPLACE('Mississippi', 'pi', 'PI') FROM dual ;

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

SQL>

Related Topic