top of page
MySQL:
INSTR
Syntax:
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 LOCATE(),
except that the order of the arguments is reversed.
URL: https://dev.mysql.com/doc/refman/8.0/en/string-functions.html
Example
mysql> SELECT INSTR('foobarbar', 'bar');
-> 4
mysql> SELECT INSTR('xbar', 'foobar');
-> 0
bottom of page