Return the position of the first occurrence of a substring. This function locates a substring within a string and returns its index.
INSTR(str,substr)Returns the position of the first occurrence of substring substr in string str. This is the same as the two-argument form of , except that the order of the arguments is reversed.
INSTR() performs a case-insensitive search.
If any argument is NULL, returns NULL.
; Returns the position of a string within a string
; Returns the substring from string before count occurrences of a delimiter
This page is licensed: GPLv2, originally from
SELECT INSTR('foobarbar', 'bar');
+---------------------------+
| INSTR('foobarbar', 'bar') |
+---------------------------+
| 4 |
+---------------------------+
SELECT INSTR('My', 'Maria');
+----------------------+
| INSTR('My', 'Maria') |
+----------------------+
| 0 |
+----------------------+