CHAR_LENGTH function - Amazon Quantum Ledger Database (Amazon QLDB)

CHAR_LENGTH function

Returns the number of characters in the specified string, where character is defined as a single unicode code point.

Syntax

CHAR_LENGTH ( string )

CHAR_LENGTH is a synonym of CHARACTER_LENGTH function.

Arguments

string

The field name or expression of data type string that the function evaluates.

Return type

int

Examples

SELECT CHAR_LENGTH('') FROM << 0 >> -- 0 SELECT CHAR_LENGTH('abcdefg') FROM << 0 >> -- 7 SELECT CHAR_LENGTH('eࠫ') FROM << 0 >> -- 2 (because 'eࠫ' is two code points: the letter 'e' and combining character U+032B)

Related functions