Csgs

How Would I Globally Replace a String in MySQL?

Asked by Csgs 2 years ago mysql string


Pablo G
0
 
Luckily MySQL has a built-in string that helps with replacement functions. You could use something like the following:

UPDATE table SET field = REPLACE(field,'/files/','/sites/default/files/');

You can actually use other functions for more complex replacements (for example regex).

by Pablo G 2 years ago

Answer this question

How Would I Globally Replace a String in MySQL?

0 errors found:

 
0