get Pi and round it up and down
mysql>
mysql> SELECT PI(), CEILING(PI()), FLOOR(PI());
+----------+---------------+-------------+
| PI() | CEILING(PI()) | FLOOR(PI()) |
+----------+---------------+-------------+
| 3.141593 | 4 | 3 |
+----------+---------------+-------------+
1 row in set (0.00 sec)
mysql>
mysql>
Related examples in the same category