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_string is omitted or if it is NULL, all occurrences of search_string are deleted from the result.
  • If search_string is NULL, string is 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;