Course
Simulator
More
Premium
Log in
PostgreSQL Function Reference
Functions
REPLACE
REPLACE
Replaces all occurrences of a substring with another substring in the string.
PostgreSQL 17.5
REPLACE
(
string
,
from
,
to
)
string
The source string.
from
The substring to replace.
to
The replacement substring.
Examples
PostgreSQL 17.5
SELECT
REPLACE
(
'abcdef'
,
'cd'
,
'XX'
)