# LENGTH function

The LENGTH function is applied to either a character string expression or a bit string expression and returns the number of characters in the result.

Because all built-in data types are implicitly converted to strings, this function can act on all built-in data types.

## Syntax

    LENGTH ( characterExpression | bitExpression )

## Examples

    -- returns 20
    VALUES LENGTH('supercalifragilistic')
    -- returns 1
    VALUES LENGTH(X'FF')
    -- returns 4
    VALUES LENGTH(1234567890)

Parent topic: Built-in functions