The CEIL or CEILING function returns the smallest integer value that is greater than or equal to expression.
The result of the function has the same data type and length attribute of the argument except that the scale is 0 if the argument is DECIMAL or NUMERIC. For example, an argument with a data type of DECIMAL(5,5) will result in DECIMAL(5,0).
If the argument can be null, the result can be null; if the argument is null, the result is the null value.
SELECT CEIL(MAX(SALARY)/12 FROM EMPLOYEEThis example returns 4396.00 because the highest paid employee is Christine Haas who earns $52750.00 per year. Her average monthly salary before applying the CEIL function is 4395.83.
SELECT CEILING( 3.5), CEILING( 3.1), CEILING(-3.1), CEILING(-3.5), FROM SYSIBM.SYSDUMMY1This example returns:
04. 04. -03. -03.respectively.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.