DB2 Scalar functions - BIGINT
The BIGINT function returns a big integer (a binary integer with a precision of 63 bits) representation of a value of a different data type.
The schema is SYSIBM.
The result is the same number that would occur if the argument were assigned to a big integer column or variable. The fractional part of the argument is truncated. If the whole part of the argument is not within the range of big integers, an error is returned (SQLSTATE 22003).
The result is the same number that would result from CAST(string-expresssion AS BIGINT). Leading and trailing blanks are eliminated and the resulting string must conform to the rules for forming an integer, decimal, floating-point, or decimal floating-point constant (SQLSTATE 22018). If the whole part of the argument is not within the range of big integers, an error is returned (SQLSTATE 22003). The data type of string-expresssion must not be CLOB or DBCLOB (SQLSTATE 42884).
The result of the function is a big integer. If the argument can be null, the result can be null; if the argument is null, the result is the null value.
SELECT BIGINT (COUNT_BIG(*)) FROM ORDERS_HISTORY
SELECT BIGINT (EMPNO) FROM EMPLOYEE
BIGINT(RECEIVED)
BIGINT(STARTTIME)
values BIGINT(TRUE)
values BIGINT(3>3)