Tuesday 2 August 2016

CEIL & FLOOR: Get ceil and floor of anumber



CEIL: function takes a number and return next highest integer.
FLOOR: function takes a number and return highest lower integer than this number.

mysql> SELECT CEIL(10.23);
+-------------+
| CEIL(10.23) |
+-------------+
|          11 |
+-------------+
1 row in set (0.00 sec)

mysql> SELECT FLOOR(10.23);
+--------------+
| FLOOR(10.23) |
+--------------+
|           10 |
+--------------+
1 row in set (0.00 sec)


Previous                                                 Next                                                 Home

No comments:

Post a Comment