Watch the 7.3 Webinar On-Demand
This new release brings updates to Universal Storage, query optimization, and usability that you won’t want to miss.

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