콘텐츠로 이동

문자열에서 부분 문자열이 처음 나타나는 위치를 반환합니다.

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