LENGTH()

Returns the number of the character string passed as parameter.

Syntax

LENGTH(
   expression STRING )
  RETURNING result INTEGER
  1. expression is any valid character string expression supported by the language.

Usage

The LENGTH() function counts the length of a character string.

If the parameter is NULL, the function returns zero.

Important: When using byte length semantics, the length is expressed in bytes. When using char length semantics, the unit is characters. This is matters when using a multibyte locale such as UTF-8.