Search
 
SCRIPT & CODE EXAMPLE
 

SQL

update part of a string in mysql

UPDATE table
SET field = REPLACE(field, 'string', 'anothervalue')
WHERE field LIKE '%string%';
Comment

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'
Comment

PREVIOUS NEXT
Code Example
Sql :: display users in mysql 
Sql :: mysql month name extract 
Sql :: how to connect mysql with specify port thorugh cmd 
Sql :: mysql user permission database 
Sql :: Are NULL values in a database the same as that of blank space or zero? 
Sql :: sql join exists 
Sql :: oracle export view ddl 
Sql :: postgres get database encoding 
Sql :: oracle current timestamp insert statement 
Sql :: mysql modify default value 
Sql :: dbms_output.put_line 
Sql :: mysql int range 
Sql :: sql update from select 
Sql :: the package java.sql is not accessible 
Sql :: sort by last three charecter in sql 
Sql :: sql query inline if 
Sql :: how to find the most occuring in SQL 
Sql :: get first 3 letters in sql 
Sql :: how to get slow query log in mysql 
Sql :: oracle sql timestamp 
Sql :: show all public tables sql 
Sql :: postgresql restore from dump 
Sql :: centos 8 install mysql 
Sql :: mysql backup skip table 
Sql :: mysql create timestamp column 
Sql :: uppercase and lowercase in sql 
Sql :: alter table add column and foreign key mysql 
Sql :: how to drop a database in sql server when it is in use 
Sql :: grant read only privileges postgres user 
Sql :: contains word in sql 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =