str replace sql code example
Example 1: sql query with replace function
UPDATE tableName
SET column_name = REPLACE(column_name, 'fromStringValue', 'toStringValue');
Update tbl_employee
Set designation = REPLACE(designation, 'SEO', 'Developer');
Example 2: mysql replace
REPLACE(str, find_string, replace_with)
Example 3: replace string value in sql
UPDATE tableName SET fieldName = REPLACE(fieldName, 'fromStringValue', 'toStringValue');
Example 4: 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.