# Inserting And Replacing Parts Of A String
__*REPLACE function*__
__*INSERT function*__
+ `REPLACE(str,substr,newstring)`: Replaces the**subst** in**str** with a new string
+ `INSERT(str,pos,len,newstring)`: Places a new string in**pos** in**str**, overwriting the**len** length character
+ For example:
  + `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 () replaces all occurrences of the specified string
- INSERT () inserts a substring at the specified position, up to a specified number of characters
