VECTOR_DIMENSION_COUNT scalar function

Returns the dimension of a vector type. This is independent from the actual vector value.

Read syntax diagramSkip visual syntax diagramVECTOR_DIMENSION_COUNT(vector-expression)

The schema is SYSIBM.

vector expression
An expression that returns the VECTOR data type.

Result

The function returns an INTEGER value representing the dimension of the vector type. The result cannot be null.

Examples

The following example shows the command syntax for retrieving the dimension of a vector:
SELECT VECTOR_DIMENSION_COUNT(RVECTOR) as VEC_DIM FROM VECTOR_TB FETCH FIRST 1 ROWS ONLY
The following example shows the output from running the SELECT statement:
VEC_DIM
-----------
          3

  1 record(s) selected.