TRUNCATE(1.999,0); : TRUNCATE « Math Numeric Functions « MySQL Tutorial






mysql>
mysql> SELECT TRUNCATE(1.999,0);
+-------------------+
| TRUNCATE(1.999,0) |
+-------------------+
|                 1 |
+-------------------+
1 row in set (0.00 sec)

mysql>








21.36.TRUNCATE
21.36.1.TRUNCATE(X,D) returns the number X, truncated to D decimal places.
21.36.2.TRUNCATE(1.999,0);
21.36.3.TRUNCATE(-1.999,1);
21.36.4.TRUNCATE(122,-2);
21.36.5.TRUNCATE(10.28*100,0);
21.36.6.SELECT TRUNCATE(545,-2);