Name

INSTR( )

Synopsis

INSTR(string, substring)

This function returns the starting position of the first occurrence of the substring. The index of the first position is 1. This function is case-insensitive unless the argument is a binary string.

SELECT INSTR('Where are you?', 'you')
       AS 'INSTR( ) Test';
+--------------+
| INSTR( ) Test |
+--------------+
|           11 |
+--------------+

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.