# LENGTH function

LENGTH 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 } )

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

Parent topic: Built-in functions