Tuesday, March 12, 2013

How To Find & Replace String in Mysql

You can find a string in a  field and replace it with another string using Mysql Query




update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');

Just like - update user set name = replace(surname,'gupta','sharma');

No comments:

Post a Comment