Wednesday, 3 September 2014

CEILING function in SQL


The CEILING functions round the specified number up, and return the smallest number that is greater than or equal to the specified number.

Syntax is:-

CEILING (NUMBER);

Example is:-

SELECT CEILING(1);
--> 1

SELECT CEILING(10.15);
--> 11

SELECT CEILING(45.10);
--> 46

SELECT CEILING(-12.34);
--> -12



No comments:

Post a Comment