33
Return the index of the first occurrence of substring
33
INSTR(str, substr) returns the index of the first occurrence of substring str in string substr. Note that this works like LOCATE except the order of the arguments is reversed: ::
35
SELECT INSTR('tacosalad', 'salad');
37
SELECT INSTR('burger', 'salad');
43
Insert a substring at the specified position up to the specified number of characters
48
This function inserts a substring at the specified position up to the specified number of characters.
50
INSERT(str,pos,len,newstr)
52
It returns str (a string), with the substring beginning at pos (position) and len (how many characters long) replaced by the newstr.
54
* INSERT returns the original string if pos is not within the length of the string
55
* It replaces the rest of the string from position pos if len is not within the length of the rest of the string
56
* It returns NULL if any argument is NULL
60
SELECT INSERT('Aquatic', 3, 2, 'Me');
62
SELECT INSERT('Aquatic', -1, 4, 'This');
64
SELECT INSERT('Aquatic', 3, 100, 'This');
48
Return the position of the first occurrence of substring
71
Return the position of the first occurrence of substring.