Answers for "update some part of a string in mysql"

SQL
1

update substring in mysql

SELECT Country, REPLACE(Country, 'States', 'Kingdom') 
FROM Persons;

UPDATE tableName
SET Country = REPLACE(Country, 'States', 'Kingdom')

-- if Country = 'United States'
-- After replace = 'United Kingdom'
Posted by: Guest on December-22-2020
1

update part of a string in mysql

UPDATE table
SET field = REPLACE(field, 'string', 'anothervalue')
WHERE field LIKE '%string%';
Posted by: Guest on April-25-2021

Code answers related to "update some part of a string in mysql"

Code answers related to "SQL"

Browse Popular Code Answers by Language