Oracle CEIL or CEILING Function

In Oracle/PLSQL, the ceil function returns the smallest integer value that is greater than or equal to a number.
The CEIL and CEILING functions round the specified number up, and return the smallest number that is greater than or equal to the specified number

The specified number must be a DOUBLE PRECISION number.
If the specified number is NULL, the result of these functions is NULL.
If the specified number is equal to a mathematical integer, the result of these functions is the same as the specified number.
If the specified number is zero (0), the result of these functions is zero.
If the specified number is less than zero but greater than -1.0, then the result of these functions is zero.

Syntax:
CEIL ( number )
CEILING ( number )
number is the value used to find the smallest integer value.

Example :
SELECT CEIL(12345.67) FROM dual;     Output: 1236
SELECT CEIL(-45.44) FROM dual;           Output: -45

No comments:

Post a Comment

Please Provide your feedback here