Replacing a substring in MySQL

UPDATE tablename SET tablename.column = REPLACE( tablename.column, “oldtext”, “newtext” ) WHERE tablename.column LIKE “%oldtext%”

2 Comments »

  1. alexh2 said,

    February 5, 2007 @ 9:47 pm

    Well, it looks like the upgrade to WP2.1 went well…

  2. Tom said,

    July 30, 2008 @ 5:29 am

    Great, this is exactly what I was lookin’ for… tks mate!

RSS feed for comments on this post · TrackBack URI

Leave a Comment