Declaration
INSTR(str,substr)
Description
Returns the first occurrence of a substring str in a given string. This is the same as the two-parameter form of LOCATE(), except that the parameter order is reversed.
Examples
obclient> SELECT INSTR('foobarbar', 'bar'), INSTR('xbar', 'foobar');
+---------------------------+-------------------------+
| INSTR('foobarbar', 'bar') | INSTR('xbar', 'foobar') |
+---------------------------+-------------------------+
| 4 | 0 |
+---------------------------+-------------------------+
1 row in set