replace({str}, {old_str}, {new_str})

Replaces all occurrences in string str of a substring old_str with a new substring new_str. Returns a new string.

Example 

This example replaces instances of ‘Al’ with ‘AL’ in the City column. The query returns the first five entries.

1SELECT replace(City, 'Al', 'AL') as "City"
2From "Superstore"
3GROUP BY City
4LIMIT 5;
City
Aberdeen
Abilene
Akron
ALbuquerque
ALexandria