Syntax
CHAR_LENGTH(str)
Purpose
CHAR_LENGTH() returns the number of characters in the str string.
A multi-byte character is counted as one character. For example, if you enter five two-byte characters, the LENGTH() function returns 10, while the CHAR_LENGTH() function returns 5.
Examples
obclient> SELECT CHAR_LENGTH('OceanBase'), LENGTH('OceanBase'),CHAR_LENGTH('hello');
+--------------------------+---------------------+----------------------+
| CHAR_LENGTH('OceanBase') | LENGTH('OceanBase') | CHAR_LENGTH('hello') |
+--------------------------+---------------------+----------------------+
| 9 | 9 | 5 |
+--------------------------+---------------------+----------------------+
1 row in set