LENGTH2 scalar function

The LENGTH2 function returns the length of expression in 16-bit UTF-16 string units (CODEUNITS16).

Read syntax diagramSkip visual syntax diagramLENGTH2(expression)

The schema is SYSIBM.

expression
An expression that returns a value that is a built-in data type.

The LENGTH2 scalar function invoked with a character or graphic string as the argument is equivalent to invoking the LENGTH function with CODEUNITS16 specified. The LENGTH2 scalar function invoked with any other data type as the argument is equivalent to invoking the LENGTH function without a string units argument.