Example: Querying SELECT CEILING(157E-1);
The following query returns the FLOAT value 16E0, because 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 because 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 because -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), because 10 is the smallest integer that is not less than 9.99. The precision of the return value is increased by 1.
SELECT CEIL( CAST(9.99 AS DECIMAL(3,2)) );