PATINDEX is similar to CHARINDEX in MSSQL — it checks whether a string exists in another string and returns its first occurring position. The difference is that PATINDEX supports wildcard characters ('%' and '_'), just like the LIKE operator.
Syntax:
PATINDEX ( '%pattern%' , expression )
Example:
select PATINDEX('%is%','This is demo')
---------------------
3
select PATINDEX('% is%','This is demo')
---------------------
5

The following example uses % and _ wildcards to find the position at which the pattern 'Sm', followed by any one character, and 'th' starts in the specified string:
select PATINDEX('%Sm_th%','This is Smith')
----------
9
select PATINDEX('%Sm_th%','This is Smyth')
----------
9


There is no similar function available in MySQL.