What MySQL query will do a text search and replace in one particular field in a table?
I.e. search for foo
and replace with bar
so a record with a field with the value hello foo
becomes hello bar
.
I used the above command line as follow: update TABLE-NAME set FIELD = replace(FIELD, 'And', 'and'); the purpose was to replace And with and ("A" should be lowercase). The problem is it cannot find the "And" in database, but if I use like "%And%" then it can find it along with many other ands that are part of a word or even the ones that are already lowercase.