Export (0) Print
Expand All
Expand Minimize

CEILING (SQL Server Compact Edition)

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


CEILING ( numeric_expression ) 

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

int

real/float

float

Nonnumeric types that can be implicitly converted to float

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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft