DB2 Version 9.7 for Linux, UNIX, and Windows

MAX_CARDINALITY scalar function

Read syntax diagramSkip visual syntax diagram
>>-MAX_CARDINALITY--(--array-variable--)-----------------------><

The schema is SYSIBM.

The MAX_CARDINALITY function returns a value of type BIGINT representing the maximum number of elements that an array can contain. This is the cardinality that was specified in the CREATE TYPE statement for the ordinary array type.

array-variable
An SQL variable, SQL parameter, or global variable of an array type, or a CAST specification of a parameter marker to an array type.

The result can be null; if the argument is an associative array, the result is the null value.

Example