Purpose
This function returns the smallest integer greater than or equal to numeric_expression.
Syntax
CEIL (numeric_expression)
Parameters
Parameter |
Description |
|---|---|
| numeric_expression | An expression of a precise or approximate numeric data type (NUMBER, FLOAT, BINARY_FLOAT, and BINARY_DOUBLE). |
Return type
The return type is the same as the data type of the numeric_expression parameter.
Examples
Return the smallest integer greater than or equal to -1.5, 1.5, 2, and 6-9.5.
obclient> SELECT CEIL(-1.5),CEIL(1.5),CEIL(2),CEIL(6-9.5) FROM DUAL;
+------------+-----------+---------+-------------+
| CEIL(-1.5) | CEIL(1.5) | CEIL(2) | CEIL(6-9.5) |
+------------+-----------+---------+-------------+
| -1 | 2 | 2 | -3 |
+------------+-----------+---------+-------------+
1 row in set
