What we can conclude if the final value in the NULL indicator is -2?

DB2DatabaseBig Data Analytics

A NULL indicator is a 2 bytes field which serves the multiple purpose. This indicator takes the value as -1 when any DB2 column has NULL value and it takes the value as 0 when DB2 column has a non NULL value.

Although the main purpose of the NULL indicator is to check whether a column has a NULL value or not, this indicator can take a value of -2 as well. A -2 value in this indicator states that a NULL value was assigned to the host variable as a result of evaluating an expression with an arithmetic error, or by an overflow while attempting to convert the numeric result value to the host variable.

Published on 14-Sep-2020 18:37:02