In MySQL, you can use the INSERT()
function to insert a string into another string.
You can either replace parts of the string with another string (e.g. replace a word), or you can insert it while maintaining the original string (e.g. add a word). The function accepts 4 arguments which determine what the original string is, the position with which to insert the new string, the number of characters to delete from the original string, and the new string to insert.
Here’s the syntax:
INSERT(str,pos,len,newstr)
Where str
is the original string, pos
is the position that the new string will be inserted, len
is the number of characters to delete from the original string, and newstr
is the new string to insert.
Continue reading →