Home > database >  Mysql5.6.3.4 processing truncate float float data accuracy problem
Mysql5.6.3.4 processing truncate float float data accuracy problem

Time:10-15



As shown in figure:
TRUNCATE (a. 10044, (1) VALUE1,
TRUNCATE (a. 10044, (2) VALUE2,
ROUND (a. 10044, (1) VALUE3,
A. 10044
Four data a. 10044 as the original data, the database type to float, 4 decimal places, truncate to take the value of the last forever little 1
And selective, when I change a target SQL, perform the same value, but there is no problem,



Indicators, 10017 and 10044, the database type exactly



Excuse me, is this why ah, have a headache

CodePudding user response:

Precision problem, float into a double

CodePudding user response:

reference 1st floor csdn_castiel response:
accuracy problem, float into a double good

I converted to a decimal, but not can't you turn, there is no other solution

CodePudding user response:

Do not change table, then select place to convert the
Select the convert (a. 10044, decimal (1, 1)), the convert (a. 10044, decimal (10, 2)) from
  • Related