MySQL TRUNCATE() The function returns the value of X truncated to D decimal places. If D is 0, remove the decimal point. If D is negative, the integer part of the D values is truncated. The syntax is as follows -
1 |
|
Here
In the example below, it will truncate the given number to up to 2 decimal places.
1 2 3 4 5 6 7 |
|
The above is the detailed content of What is the use of MySQL TRUNCATE() function?. For more information, please follow other related articles on the PHP Chinese website!