Name

replace() — Find and replace substrings

Common Usage

replace( value, search, replacement )

Description

The replace() function returns a copy of value with each instance of the search substring replaced by replacement . If any of the parameters are NULL, a NULL will be returned. If search is an empty string, value will be returned unmodified. Otherwise, all parameters will be converted into text values.

The replace() function also works on BLOB values, although the result is returned as a text value and must be cast back to a BLOB.

See Also

substr()

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.