Skip to main content
Version: V1.0.0

POSITION

Syntax​

POSITION(substr IN str)

Description​

Finds the first occurrence of the substring substr in the string str and returns its position.

Examples​

SELECT POSITION('bar' IN 'foobarbar');
+--------------------------------+
| POSITION('bar' IN 'foobarbar') |
+--------------------------------+
| 4 |
+--------------------------------+
1 row in set (0.001 sec)