Try the following:
// round the value to two decimal places SELECT ROUND(<YOUR_FIELD>, 2) field FROM <YOUR_TABLE> // use truncate if you don't wan't to round the actual value SELECT TRUNCATE(<YOUR_FIELD>, 2) field FROM <YOUR_TABLE> // you can also use round or truncate depending whether the third decimal is > 5 SELECT IF(SUBSTR(<YOUR_FIELD>, 5, 1) > 5, ROUND(<YOUR_FIELD>, 2), TRUNCATE(<YOUR_FIELD>, 2)) field FROM <YOUR_TABLE>;
The above is not a complete solution, but perhaps it will point you in the right direction.
Read the documentation for mysql round() and mysql truncate()
source share