Outdated Version

You are viewing an older version of this section. View current production version.

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 |
+--------------------------+----------------+