PHP开发教程

MySQL CEIL()/CEILING()函数

CEIL(X)

CEILING(X)

这些函数返回的最小整数的值不小于X的请看下面的例子:

mysql> SELECT CEILING(3.46);
+---------------------------------------------------------+
| CEILING(3.46) |
+---------------------------------------------------------+
| 4 |
+---------------------------------------------------------+
1 row in set (0.00 sec)

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


Powered by PHP二次开发 ©2008-2017