Skip to main content
Scalar function
Aliases: char_length Returns NULL for NULL input.

Syntax

Scalar

Arguments

Returns

  • Type: INTEGER; BIGINT for strings using large-string storage
  • Possible values: A nonnegative count of Unicode code points; zero for an empty string.
  • NULL behavior: Returns NULL for NULL input.

Properties

Units

  • Input unit: UTF-8 string
  • Output unit: Unicode code points
  • octet_length counts UTF-8 bytes instead.

Usage notes

  • A combined visible grapheme can contain several Unicode code points.

Examples

Typical behavior

Unicode characters and trailing spaces

Limitations

  • Some large-string columns return a BIGINT count even when query tools report INTEGER.
Last modified on October 15, 2026