Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts

Wednesday, 1 April 2009

Replace string

If you want to replace F: with D: in column called 'filepath'

filepath

F:/Windows/User
F:/Windows/Admin
F:/Windows/Guest

------------------------------------------------------------------------
UPDATE `files` SET `filepath` = Replace( `filepath`, 'F:', 'D:' )
------------------------------------------------------------------------