Skip to content

Returns the position of the first occurrence of a substring. Alias for LOCATE.

func.strpos(<str>, <substr>)
func.strpos('hello world', 'world')
┌───┐
7
└───┘
STRPOS(<str>, <substr>)
SELECT STRPOS('hello world', 'world');
┌───┐
7
└───┘