|Oracle9i SQL Reference
Release 1 (9.0.1)
Part Number A90125-01
Functions, 99 of 166
REPLACE returns char with every occurrence of search_string replaced with replacement_string. If replacement_string is omitted or null, all occurrences of search_string are removed. If search_string is null, char is returned.
Both search_string and replacement_string, as well as char, can be any of the datatypes
NCLOB. The string returned is of
VARCHAR2 datatype and is in the same character set as char.
This function provides a superset of the functionality provided by the
TRANSLATE provides single-character, one-to-one substitution.
REPLACE lets you substitute one string for another as well as to remove character strings.
The following example replaces occurrences of "J" with "BL":