xxxxxxxxxx
SELECT
REPLACE ('ABC AA', 'A', 'Z');
Code language: SQL (Structured Query Language) (sql)
xxxxxxxxxx
-- You want to use postgresql's replace function:
replace(string text, from text, to text)
-- for instance :
UPDATE <table> SET <field> = replace(<field>, 'cat', 'dog')