How POSITION() Works in MariaDB

In MariaDB, POSITION() is a built-in string function that returns the position of the first occurrence of a substring within another string. It’s part of ODBC 3.0.

POSITION(substr IN str) is a synonym for LOCATE(substr,str).

POSITION() is also similar to the INSTR() function, except that POSITION() uses the IN syntax, and that the argument order is reversed between these two functions.

Continue reading