CEILING function [Numeric]

Function

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

Syntax

CEILING ( numeric-expression )

Parameters

numeric-expression The number whose ceiling is to be calculated.

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

See also

“FLOOR function [Numeric]”