Skip to content

Instantly share code, notes, and snippets.

@mipmip
Created February 16, 2012 12:03
Show Gist options
  • Save mipmip/1844372 to your computer and use it in GitHub Desktop.
Save mipmip/1844372 to your computer and use it in GitHub Desktop.
SQL: search and replace
UPDATE egw_wiki_pages SET wiki_body = replace(`wiki_body`,"http://www.domain.nl/wiki/images/","http://xxx.domain.nl/imgwiki/") where wiki_name='XOR';
UPDATE table SET column = replace(column, regex '%-%', ' ') where id = xxx;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment