Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 MySQL 表,其中字段是这样开头的字符串:
<h2>texttext</h2>texttexttext.... <h2>text2text2</h2>texttexte......
我想将列中所有字段的 h2 替换为 h1 标记。我尝试过使用这样的 REPLACE 查询:
UPDATE myTable SET column = REPLACE(column, 'h2>', 'h1>')
但它没有用。
请让我知道我做错了什么。
谢谢你。
将整个数据库转储到 SQL 文件。在任何文本编辑器中搜索替换。导入回来。