This documentation is archived and is not being maintained.

CEILING (SQL Server Compact Edition)

Returns the smallest integer that is greater than, or equal to, the given numeric expression.

CEILING ( numeric_expression ) 


An expression of the exact numeric or approximate numeric data type categories, or types that is implicitly convertible to float (except for the bit data type).

Returns the same type as numeric_expression except for the following expressions.

Specified expression Return type

tinyint, smallint




Nonnumeric types that can be implicitly converted to float


This example uses the CEILING (SQL Server Compact Edition) function to round off the unit price for products that are priced more than 100 dollars.

SELECT OrderID, UnitPrice, CEILING (UnitPrice) AS "CEILING"
FROM "Order Details"
WHERE UnitPrice > 100
ORDER BY UnitPrice