sachin
answered Jun 2 '22 00:00
POSITION() function can be used find string /character in the given string or word .
POSITION() return :
if found in given string , POSITION() returns the index in string where given character or string is found
if not found in given string , POSITION() returns 0
SELECT POSITION("r" IN "array") AS matcheindex;
at above query POSITION try to find "r" character in "array" and it return 2
SELECT POSITION("0" IN "array") AS matcheindex;
at above query POSITION try to find "0" character in "array" and it does not found that so it return 0