SingleStore Managed Service

CHARACTER_LENGTH

Returns the Unicode character length of the given string.

Syntax
CHARACTER_LENGTH (str)
CHAR_LENGTH (str)
Arguments
  • str: any string or binary object.

Return Type

Integer

Examples
SELECT CHARACTER_LENGTH('olé'), LENGTH('olé');
+--------------------------+----------------+
| CHARACTER_LENGTH('olé')  | LENGTH('olé')  |
+--------------------------+----------------+
|                        3 |              4 |
+--------------------------+----------------+