I want to replace all instances of a string quote (') with two single quotes ('') in a string.
Lets say e'QmfgLu/]sf]/sd is a string and I want to replace ' with ''.
The result must be e''OmfgLu/]
I tried this query:
update customer set name=REGEXP_REPLACE(name, E'\'', '''');
also
update customer set name=REPLACE(name, E'\'', '''');
This query is not properly working. What is the suitable way to write the query?