tech on the net

Oracle/PLSQL: CEIL Function

Learn how to use the Oracle/PLSQL CEIL function with syntax and examples.

Description

The Oracle/PLSQL CEIL function returns the smallest integer value that is greater than or equal to a number.

Syntax

The syntax for the Oracle/PLSQL CEIL function is:

CEIL( number )

Parameters or Arguments

number is the value used to find the smallest integer value.

Applies To

The CEIL function can be used in the following versions of Oracle/PLSQL:

  • Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

Example

Let's look at some Oracle CEIL function examples and explore how you would use the CEIL function in Oracle/PLSQL.

For example:

CEIL(32.65) would return 33
CEIL(32) would return 32
CEIL(-32.65) would return -32
CEIL(-32) would return -32