length

English [leŋθ] US [leŋθ]

n. 길이, 길이(언어) 소리 길이;

SQLite LENGTH 함수 통사론

함수: SQLite LENGTH 함수는 문자열의 길이를 반환합니다.

구문: ​​sqlite> SELECT 이름, 길이(특정 데이터 열) FROM TABLENAME;

SQLite LENGTH 함수 예

COMPANY 表

ID          NAME        AGE         ADDRESS     SALARY
----------  ----------  ----------  ----------  ----------
1           Paul        32          California  20000.0
2           Allen       25          Texas       15000.0
3           Teddy       23          Norway      20000.0
4           Mark        25          Rich-Mond   65000.0
5           David       27          Texas       85000.0
6           Kim         22          South-Hall  45000.0
7           James       24          Houston     10000.0


实例:

sqlite> SELECT name, length(name) FROM COMPANY;

结果:

NAME        length(name)
----------  ------------
Paul        4
Allen       5
Teddy       5
Mark        4
David       5
Kim         3
James       5