instr
instrβ
Descriptionβ
Syntaxβ
INSTR (VARCHAR STR, VARCHAR substrate)
Returns the location where substr first appeared in str (counting from 1). If substr does not appear in str, return 0.
exampleβ
mysql> select instr("abc", "b");
+-------------------+
| instr('abc', 'b') |
+-------------------+
| 2 |
+-------------------+
mysql> select instr("abc", "d");
+-------------------+
| instr('abc', 'd') |
+-------------------+
| 0 |
+-------------------+
keywordsβ
INSTR