Logo 
Search:

SQL Server Articles

Submit Article
Home » Articles » SQL Server » Math FunctionsRSS Feeds

CEILING Function

Posted By: Sarita Patel     Category: SQL Server     Views: 5063

This article explains CEILING function of sql server with examples.

CEILING function is used to get smallest integer number greater than or equal to the numeric expression.


Syntax of CEILING Function :

CEILING (numeric_expression)

numeric_expression is a number or approximate number data type except bit.

Return type of CEILING function is same as specified numeric expression.



Examples of CEILING Function :

Example 1 : Use of CEILING function in select clause

SELECT  CEILING(560.550)

Output
561  

Above example returns smallest integer number greater than the specified positive number.



Example 2 : Use of CEILING function in select clause

SELECT  CEILING(-560.550)

Output
-560

Above example returns smallest integer number greater than the specified negative number.

  
Share: 

 
 
 

Didn't find what you were looking for? Find more on CEILING Function Or get search suggestion and latest updates.

Sarita Patel
Sarita Patel author of CEILING Function is from United States.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!