Returns the smallest integer value greater than or equal to the argument.
The schema is SYSIBM.
(The SYSFUN version of the CEILING function continues to be available.)
- expression
- An expression that returns a value of any built-in numeric data type.
The result of the function has the same data type and length attribute as the argument except that the scale is 0 if the argument is DECIMAL.
For example, an argument with a data type of DECIMAL(5,5) returns DECIMAL(5,0).
The result can be null if the argument can be null or if the argument is not a decimal floating-point number and the database is configured with dft_sqlmathwarn
set to YES; the result is the null value if the argument is null.
Notes
- Results involving DECFLOAT special values:
For decimal floating-point values, the special values are treated as follows:
- CEILING(NaN) returns NaN.
- CEILING(-NaN) returns -NaN.
- CEILING(Infinity) returns Infinity.
- CEILING(-Infinity) returns -Infinity.
- CEILING(sNaN) returns NaN and a warning.
- CEILING(-sNaN) returns -NaN and a warning.
© Copyright IBM Corp.