PL/SQL Replace

Oracle PL/SQL Replace Function

The Replace function replaces a sequence of characters in a string with another set of characters.

The Replace Function syntax:

replace( string, string_to_replace, [ replacement_string ] )

Example

select replace('098098oracle', '098')from dual;

would return 'oracle'


select replace('0011report01', '01')from dual;

would return '01report'


select replace('forms6i', '6', '9')from dual;

would return 'forms9i'


select replace('00001986', '0', ' ')from dual;

would return '    1986'