Skip to content
Home » News » MySQL REPLACE Function

MySQL REPLACE Function

Just a quick reminder and example to myself really for this useful MySQL string function.

Syntax:

REPLACE( table_field, search, replace)

Example (replaces all instances of donkey with horse:

UPDATE `table` SET `table_field` = REPLACE( `table_field`, 'donkey', 'horse')