Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
(1 row(s) affected)SELECT FLOOR(12.9273)
SELECT FLOOR(12.9273)
Here is the result set.
---------------------------------------
12
(1 row(s) affected)
See Also
Other Resources
CEILING (Transact-SQL)
FLOOR (Transact-SQL)
Mathematical Functions (Transact-SQL)