Skip to content

Instantly share code, notes, and snippets.

@bran921007
Created January 24, 2015 00:13
Show Gist options
  • Save bran921007/7cbc2ed3543abd501860 to your computer and use it in GitHub Desktop.
Save bran921007/7cbc2ed3543abd501860 to your computer and use it in GitHub Desktop.
Mysql con expresiones regulares
UPDATE TABLE SET COLUMN = REPLACE(COLUMN, 'oldvalue', 'newvalue')
WHERE COLUMN REGEXP 'oldvalue';
Donde:
column es el nombre del campo en la tabla.
oldvalue es aquello que deseamos modificar.
newvalue es la nueva cadena que reemplaza la anterior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment