Storing statistical data, do I need DECIMAL, FLOAT or DOUBLE?

后端 未结 6 1559
猫巷女王i
猫巷女王i 2020-12-02 15:07

I am creating for fun, but I still want to approach it seriously, a site which hosts various tests. With these tests I hope to collect statistical data.

Some of the

6条回答
  •  心在旅途
    2020-12-02 15:57

    Put it simply, Float and double are not as precise as decimal. decimal is recommended for money related number input.(currency and salary). Another point need to point out is: Do NOT compare float number using "=","<>", because float numbers are not precise.

提交回复
热议问题