MySQL数据库中的搜索和替换

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MySQL数据库中的搜索和替换相关的知识,希望对你有一定的参考价值。

  1. UPDATE tablename SET fieldname =
  2. REPLACE(fieldname, searchstring, replacestring);
  3.  
  4. ;example changing DOMAIN IN wordpress posts
  5.  
  6. UPDATE wp_posts SET post_content =
  7. REPLACE(post_content, 'www.domain.de', 'domain.com');

以上是关于MySQL数据库中的搜索和替换的主要内容,如果未能解决你的问题,请参考以下文章