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