REPLACE
This function returns the string that emerges if in the string all occurrences of search_string are replaced by replace_
string.
Syntax
replace::=
Usage Notes
- If
replace_stringis omitted or if it isNULL, all occurrences ofsearch_stringare deleted from the result. - If
search_stringisNULL,stringis returned. - If the input parameters are not strings, they will be automatically converted to strings.
- The return type is always a string, even if all of the parameters possess another type.
Example
SELECT REPLACE('Apple juice is great','Apple','Orange') REPLACE_1;