Skip to content

Commit d5db316

Browse files
committed
update and replace
1 parent 319483f commit d5db316

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ function sidebarDatabase()
5252
items: [
5353
{text: "MySQL 用户授权", link: "/database/mysql/grant-privileges-to-user"},
5454
{text: "修改 MySQL 用户密码", link: "/database/mysql/change-password"},
55+
{text: "查找和替换文本", link: "/database/mysql/update-and-replace"},
5556
]
5657
}
5758
];
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# 查找和替换文本
2+
3+
```sql
4+
UPDATE `table_name` SET `field_name` =
5+
replace(`field_name`, '[string_to_find]', '[string_to_replace]');
6+
```
7+
8+
- `table_name` 待修改的表名
9+
- `filed_name` 替换的字段名
10+
- `[string_to_find]` 待查找到字符串
11+
- `[string_to_replace]` 替换的字符串

0 commit comments

Comments
 (0)