Insert the string "Example" into the string "91xjr.com". Replace the first nine characters:
SELECT INSERT("91xjr.com", 1, 9, "Example");
Try it Yourself »
The INSERT() function inserts a string within a string at the specified position and for a certain number of characters.
INSERT(
string,
position,
number,
string2)
Parameter | Description |
---|---|
string | Required. The string that will be modified |
position | Required. The position where to insert string2 |
number | Required. The number of characters to replace |
string2 | Required. The string to insert into string |
Works in: | From MySQL 4.0 |
---|
Insert the string "no" into the string "91xjr.com". Replace three characters, starting from position 11:
SELECT INSERT("91xjr.com", 11, 3, "no");
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!