# 插入和替换字符串的某些部分

__*REPLACE 函数*__
__*INSERT 函数*__

+ `REPLACE(str,substr,newstring)`: 将 **str** 中的 **substr** 替换为新字符串
+ `INSERT(str,pos,len,newstring)`: 在 **str** 中的 **pos** 处放置新字符串,覆盖 **len** 长度字符
+ 例如:
  + `SELECT replace('Use K8S to setup','K8S','tiup'), insert('Use OGG to migrate', 5, 3, 'Dumpling and Lightning')\G` 
```
tidb> SELECT 
   -> ~!@replace@!~(
   ->   'Use K8S to setup','K8S','tiup'
   -> ), 
   -> ~!@insert@!~(
   ->   'Use OGG to migrate', 5, 3, 'Dumpling and Lightning'
   -> );
+------------------------------------------+--------------------------------------------------------------+
| replace('Use K8S to setup','K8S','tiup') | insert('Use OGG to migrate', 5, 3, 'Dumpling and Lightning') |
+------------------------------------------+--------------------------------------------------------------+
| Use tiup to setup                        | Use Dumpling and Lightning to migrate                        |
+------------------------------------------+--------------------------------------------------------------+
1 row in set (0.00 sec)
```
-------------------------------------------------------------
- REPLACE()	替换所有出现的指定字符串
- INSERT()	在指定位置插入一个子字符串,最多不超过指定字符数
