CHAR_LENGTH function in Amazon QLDB - Amazon Quantum Ledger Database (Amazon QLDB)

CHAR_LENGTH function in Amazon QLDB

In Amazon QLDB, use the CHAR_LENGTH function to return the number of characters in the specified string, where character is defined as a single unicode code point.


CHAR_LENGTH ( string )

CHAR_LENGTH is a synonym of CHARACTER_LENGTH function in Amazon QLDB.



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

Return type



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