Export (0) Print
Expand All

Comparing CEILING and FLOOR

The CEILING function returns the smallest integer greater than or equal to the specified numeric expression. The FLOOR function returns the largest integer less than or equal to the specified numeric expression. For example, in considering a numeric expression of 12.9273, CEILING returns 13 and FLOOR returns 12. The return value of both FLOOR and CEILING has the same data type as the input numeric expression.

SELECT CEILING(12.9273);

Here is the result set.

13

SELECT FLOOR(12.9273);

Here is the result set.

12

Community Additions

ADD
Show:
© 2014 Microsoft