Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Aug 252010
 

Replace string in MySQL

Answer:

Replace a string with the UPDATE statement is easy in MySQL

E.g.

mysql> UPDATE table1 SET name = REPLACE (name, 'foo', 'bar');

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>