跳转到内容

返回子字符串在字符串中首次出现的位置。

func.locate(<substr>, <str>[, <pos>])
func.locate('or', 'hello world')
┌───┐
│ 8 │
└───┘
LOCATE(<substr>, <str>[, <pos>])
SELECT LOCATE('or', 'hello world');
┌───┐
│ 8 │
└───┘