Any suggestions? Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

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 3.5) function to round off the unit price for products that are priced more than 100 dollars.

SELECT [Order ID], [Unit Price], CEILING ([Unit Price]) AS [CEILING]
FROM [Order Details]
WHERE [Unit Price] > 100
ORDER BY [Unit Price]
© 2016 Microsoft