Overview
TheCEIL()
function returns the nearest positive or negative integer value greater than or equal to the provided decimal input number.
Syntax
The syntax of theCEIL()
function is as follows:
CEIL()
function requires one argument:
x
: A positive or a negative decimal number (or an expression that evaluates to a decimal number).
Examples
Case #1: Rounding up a positive decimal value
The following example demonstrates how theCEIL()
function rounds up a positive decimal value:
Case #2: Rounding up a negative decimal value
The following example demonstrates how theCEIL()
function rounds up a negative decimal value:
Case #3: Using the CEIL()
function with a table
The following example demonstrates how the CEIL()
function can be used with a table to round up the values in a specific column:
- First, create a table called CeilRecords with the following query:
- The statement below can be used to retrieve and round up the value for all records in the column *numbers:
- A numbers column with initial decimal values.
- A CeilValue column with rounded-up integer values.