Update substring in mysql

This article is tagged with: Update substring in mysql and mysql

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'

This article is tagged with: Update substring in mysql and mysql