MySQL POSITION Function

Example

Search for “3” in string “Iampsp.com”, and return position:

SELECT POSITION(“3” IN “Iampsp.com”) AS MatchPosition;

Definition and Usage

The POSITION() function returns the position of the first occurrence of a substring in a string.

If the substring is not found within the original string, this function returns 0.

This function performs a case-insensitive search. Continue reading MySQL POSITION Function