CHAR_LENGTH Function [String]

The CHAR_LENGTH function returns a signed 32-bit value containing the character length of the LONG VARCHAR column or variable parameter, including the trailing blanks.

Syntax

CHAR_LENGTHlong-varchar-object )

Parameters

Usage

  • CHAR_LENGTH supports LONG VARCHAR columns and LONG VARCHAR variables of any size of data. Currently, a SQL variable can hold up to 2GB - 1 in length.
  • If the argument is NULL, CHAR_LENGTH returns NULL.
  • If the character length exceeds 2GB - 1 (2147483647), an error is returned.