Monday 18 October 2010

How to Find and Replace Text in MySQL Database?

Use the following syntax for replacing text in mysql:

The syntax of REPLACE is REPLACE(text_string, from_string, to_string)

SELECT REPLACE(‘www.mysql.com’, ‘my’, ‘you');

and result will be:

www.yousql.com

Cheers!

1 comment: