LOCATE

Returns the position of the first occurrence of a substring in a string.

Analyze Syntax

func.locate(<substr>, <str>[, <pos>])

Analyze Examples

func.locate('or', 'hello world')

┌───┐
 8  
└───┘

SQL Syntax

LOCATE(<substr>, <str>[, <pos>])

SQL Examples

SELECT LOCATE('or', 'hello world');

┌───┐
 8  
└───┘