The INSTR() function returns the position of the first occurrence of a string
in another string.
This function performs a case-insensitive search.
INSTR(string1, string2)
string1: Required. The string that will be searched
string2: Required. The string to search for in string1.
If string2 is not found, this function returns 0.
Search for "COM" in string "W3Schools.com", and return position:
SELECT INSTR("W3Schools.com", "COM") AS MatchPosition;
Search for "a" in CustomerName column, and return position:
SELECT INSTR(CustomerName, "a") FROM Customers;