Don't ever use the float type for database columns

Updated . Posted . Visible to the public. Repeats.

Like in any language, a FLOAT will eventually corrupt data due to rounding errors.

Please use DECIMAL, which has well-defined behavior for rounding and range overflows.

Henning Koch
Last edit
Henning Koch
Keywords
mysql, postgresql, anysql
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2014-02-24 11:51)