Home  >  Article  >  Database  >  In the function INSERT(str, Pos, len, newstr), what will be the result if len is not within the length of the rest of the string?

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

王林
王林forward
2023-08-24 17:25:05530browse

在函数 INSERT(str, Pos, len, newstr) 中,如果 len 不在字符串其余部分的长度之内,结果会是什么?

If 'len' is not within the length of the rest of the string, the MySQL INSERT() function will continue to remove characters until the end of the string is original String.

Example

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

The above is the detailed content of In the function INSERT(str, Pos, len, newstr), what will be the result if len is not within the length of the rest of the string?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete