时间:2021-07-01 10:21:17 帮助过:16人阅读
TRUNCATE(x,y)返回数值x保留到小数点后y位的值(与ROUND最大的区别是不会进行四舍五入),请看下面实例:
mysql>SELECT TRUNCATE(7.536432,2);
+---------------------------------------------------------+
| TRUNCATE(7.536432,2) |
+---------------------------------------------------------+
| 7.53 |
+---------------------------------------------------------+
1 row in set (0.00 sec)