3.2.31. INSERT(string1,string2[,position[,length[,padchar]]]) Returns the result of inserting string1 into a copy of string2. If position is specified, it marks the character in string2 which string1 it to be inserted after. Position must be a non-negative whole number, and it defaults to 0, which means that string2 is put in front of the first character in string1. If length is specified, string1 is truncated or padded on the right side to make it exactly length characters long before it is inserted. If padding occurs, then padchar is used, or <space> if padchar is undefined. INSERT(‘first’, ‘SECOND’) –> ‘SECONDfirst’ INSERT(‘first’, ‘SECOND’, 3) –> ‘fiSECONDrst’ INSERT(‘first’, ‘SECOND’, 3, 10) –> ‘fiSECOND rst’ INSERT(‘first’, ‘SECOND’, 3, 10, ‘*’) –> ‘fiSECOND****rst’ INSERT(‘first’, ‘SECOND’, 3, 4) –> ‘fiSECOrst’ INSERT(‘first’, ‘SECOND’, 8) –> ‘first SECOND’
PREV NEXT