SUBSTR

SUBSTR (부분 문자열 추출)

SUBSTR 함수는 입력 문자열의 시작~endIndex 부분 문자열을 가져와요. 인덱스는 0부터 시작합니다. 문자열 끝까지 계산하려면 endIndex를 -1로 설정하세요.

출처: 문서

본문

SUBSTR(col, startIndex, endIndex) 형식으로 사용해요.

사용 예시

select SUBSTR('Pinot', 1, -1) AS name
FROM ignoreMe
name
inot
select SUBSTR('Pinot', 0, 2) AS name
FROM ignoreMe
name
Pi

더 알아보기 (Learn more)