Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

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'
 
PREVIOUS NEXT
Tagged: #update #substring #mysql
ADD COMMENT
Topic
Name
7+6 =