replace all occurrences of string in sql server code example
Example 1: sql replace character in string in all records
UPDATE employees
SET
phone_number = REPLACE(phone_number, '.', '-');
Example 2: stuff and replace in sql
STUFF Function: This function is used to
overwrite existing character or inserts
a string into another string.
REPLACE function: This function is used
to replace the existing characters
of all the occurrences.