CEIL

2023-10-31 11:17:12  Updated

Purpose

CEIL() returns the smallest integer that is greater than or equal to the value of numeric_expression.

Syntax

CEIL (numeric_expression)

Parameters

Parameter Description
numeric_expression An expression of an exact or approximate numeric data type, such as NUMBER, FLOAT, BINARY_FLOAT, or BINARY_DOUBLE.

Return type

The return type is the same as the data type of numeric_expression.

Examples

The following example returns the smallest integers that are respectively 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

Contact Us