SQL Server CEILING() Function
THE WORLD'S LARGEST WEB DEVELOPER SITE

SQL Server CEILING() Function

❮ SQL Server Functions

Example

Return the smallest integer value that is greater than or equal to a number:

SELECT CEILING(25.75) AS CeilValue;
Try it Yourself »

Definition and Usage

The CEILING() function returns the smallest integer value that is greater than or equal to the specified number.

Tip: See also the FLOOR() and ROUND() functions.

Syntax

CEILING(number)

Parameter Values

Parameter Description
number Required. A numeric value

Technical Details

Works in: SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, SQL Server 2005

More Examples

Example

Return the smallest integer value that is greater than or equal to a number:

SELECT CEILING(25) AS CeilValue;
Try it Yourself »

Example

Return the smallest integer value that is greater than or equal to a number:

SELECT CEILING(-13.5) AS CeilValue;
Try it Yourself »

❮ SQL Server Functions