Tag Archives: sql find and replace

MySQL Database Find and Replace Field Text Query Syntax

Hey there,

You might have stopped while working with applications where you wanted to find some specific string values from the database & replace with another value. This can be easily achieved within the MySQL database. The syntax for FIND & REPLACE operation on MySQL database as follows.

Where,
yourTableName is the name of the Database Table.

YourFieldName is the Field name corresponds to the Database Table yourTableName.

stringToFind is the String to find from the field value.

stringToReplace is the string to be replaced for the existing stringToFind string.

For eg.

Let’s say YourFieldName value as Name is a very Good boy. Name is very intelligent also. You can’t see any boy like Name..;)

And if you want to replace Name with Jax try the following query.

After the query execution, New YourFieldName value will be

Jax is a very Good boy. Jax is very intelligent also. You can’t see any boy like Jax ..;)

That’s it..Share this..Cheers..:)