What MySQL INSERT() function returns if the number of characters to be removed exceeds the number of characters available in original string?


In case if the number of characters to be removed exceeds the number of characters available in original 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,'original');

+----------------------------------------+
| INSERT('myteststring',3,15,'original') |
+----------------------------------------+
| myoriginal                             |
+----------------------------------------+

1 row in set (0.00 sec)

Updated on: 06-Feb-2020

34 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements