In function INSERT(str, Pos, len, newstr), what would be the result if ‘len’ is not within the length of the rest of string?


In case if ‘len’ is not within the length of the rest of the string then MySQL INSERT() function will continue to remove the characters until the end of the original string.

Example

mysql> Select INSERT('myteststring',3,15,'name');
+------------------------------------+
| INSERT('myteststring',3,15,'name') |
+------------------------------------+
| myname                             |
+------------------------------------+
1 row in set (0.00 sec)

Ayyan
Ayyan

e

Updated on: 22-Jun-2020

44 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements