Example: Querying SELECT CEILING(157E-1);
The following query returns the FLOAT value 16E0, since 16 is the smallest integer that is not less than the FLOAT value 15.7E0.
SELECT CEILING(157E-1);
Example: Querying SELECT CEILING(15.7);
The following query returns a DECIMAL value of 16.0 since 16 is the smallest integer that is not less than the DECIMAL literal 15.7.
SELECT CEILING(15.7);
Example: Querying SELECT CEILING(-12.3);
The following query returns a DECIMAL value of -12.0 since -12 is the smallest integer that is not less than the DECIMAL literal -12.3.
SELECT CEILING(-12.3);
Example: Querying SELECT CEIL( CAST(9.99 AS DECIMAL(3,2)) );
The following query returns the value 10.00 with a data type of DECIMAL(4,2), since 10 is the smallest integer that is not less than 9.99. Note that the precision of the return value is increased by 1.
SELECT CEIL( CAST(9.99 AS DECIMAL(3,2)) );