CEIL Function [Numeric]

Returns the smallest integer greater than or equal to the specified expression.

CEIL is as synonym for CEILING.

Syntax

CEILnumeric-expression )

Parameters

Parameters

Description

expression

A column, variable, or expression with a data type that is either exact numeric, approximate numeric, money, or any type that can be implicitly converted to one of these types. For other data types, CEIL generates an error. The return value has the same data type as the value supplied.

Usage

For a given expression, the CEIL function takes one argument. For example, CEIL (-123.45) returns -123. CEIL (123.45) returns 124.

Standards and Compatibility

  • SQL—ISO/ANSI SQL compliant.

  • Sybase—Compatible with Adaptive Server Enterprise.