Posts Oracle update data by using replace
Post
Cancel

Oracle update data by using replace

Let us assume that there is a table:

1
CLIENT_COMPLAINTS

In this table there are two columns:

1
2
ID,
DESCRIPTION

By mistake someone captured client sensitive information as part of description which needs to be replaced with xxxx.

  • SQL update query to do that is:
1
2
3

UPDATE CLIENT_COMPLAINTS SET DESCRIPTION = REPLACE(DESCRIPTION, '01/2021', 'xx/xxxx') WHERE id=2154485618838;

This post is licensed under CC BY 4.0 by the author.