Welcome to plsql4all.blogspot.com SQL, MYSQL, ORACLE, TERADATA, MONGODB, MARIADB, GREENPLUM, DB2, POSTGRESQL.

Wednesday, 3 September 2014

CEIL function in MySql


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

Syntax is:-

CEIL (NUMBER);

Example is:-

mysql> SELECT CEIL(11);
--> 11

mysql> SELECT CEIL(45.50);
--> 46

mysql> SELECT CEIL(-22.2);
--> 23

mysql> SELECT CEIL(-22);
--> -22

mysql> SELECT CEIL(-12.51);
--> -12

mysql> SELECT CEIL(-50.5);
--> -50



Read Also:-  CEIL function in SQL

No comments:

Post a Comment

Please provide your feedback in the comments section above. Please don't forget to follow.