CEILING Function [Numeric]

Returns the ceiling (smallest integer not less than) of a number.

CEIL is as synonym for CEILING.

Syntax

CEILINGnumeric-expression )

Parameters

Parameter

Description

numeric-expression

The number whose ceiling is to be calculated.

Returns

DOUBLE

Examples

The following statement returns the value 60.00000:

SELECT CEILING( 59.84567 ) FROM iq_dummy

The following statement returns the value 123:

SELECT CEILING( 123 ) FROM iq_dummy

The following statement returns the value 124.00:

SELECT CEILING( 123.45 ) FROM iq_dummy

The following statement returns the value -123.00:

SELECT CEILING( -123.45 ) FROM iq_dummy

Standards and Compatibility

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Compatible with Adaptive Server Enterprise.

Related reference
FLOOR Function [Numeric]
CEIL Function [Numeric]