웹이야기

MySQL CEIL(), CEILING() 본문

D/MySQL

MySQL CEIL(), CEILING()

yeon.Biju 2020. 3. 26. 19:03

CEIL(X)

CEIL() is a synonym for CEILING()

 

CEILING(X)

Returns the smallest integer value not less than X.

 

 

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

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

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

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


'D > MySQL' 카테고리의 다른 글

MySQL FLOOR()  (0) 2020.03.26
MySQL CONV()  (0) 2020.03.26
MySQL ABS()  (0) 2020.03.26
MySQL Mathematical Functions  (0) 2020.03.26
MySQL Arithmetic Operators  (0) 2020.03.26
Comments