Categories: String
REPLACE
Removes all occurrences of a specified substring and replaces them with another string.
Syntax
REPLACE(string_expression varchar, pattern varchar, replacement varchar) → varchar
- string_expression: String expression in which to do the replacements.
- pattern: The substring you want replaced in the string_expression.
- replacement: The string to replace the occurrences of the pattern substring with.
Examples
REPLACE exampleSELECT REPLACE('THE CATATONIC CAT', 'CAT', 'DOG')
-- sample return 1
Was this page helpful?
Glad to hear it! Thank you for your feedback.
Sorry to hear that. Thank you for your feedback.