Purpose
This function returns the length of a string. Multibyte characters (such as Chinese characters and full-width characters) are counted as one character.
Syntax
LENGTH(char)
Parameters
char is a string of the CHAR, VARCHAR2, NCHAR, NVARCHAR2, or CLOB data type.
Return type
NUMBER
Examples
Return the length of the string OceanBase.
obclient> SELECT LENGTH('OceanBase') "LENGTH" FROM DUAL;
+--------+
| LENGTH |
+--------+
| 9 |
+--------+
1 row in set
