Provide the smallest whole number that is equal to or greater than a given number.
SELECT CEILING(25.75) AS CeilValue; |
The CEILING() function outputs the smallest integer greater than or equal to a given number.
Tip: For related functionality, consider exploring the FLOOR() and ROUND() functions as well.
CEILING(number) |
Parameter |
Description |
number |
Necessary. A numerical value. |
Works in: |
Available in SQL Server from 2008 onward, as well as in Azure SQL Database, Azure SQL Data Warehouse, and Parallel Data Warehouse. |
Provide the smallest whole number that is equal to or greater than a given number.
SELECT CEILING(25) AS CeilValue; |
Provide the smallest integer that is equal to or greater than a given number.
SELECT CEILING(-13.5) AS CeilValue; |