Reputation:
Is this set somehow in a variable?
Is it possible to store decimal values in INT
fields or does it have to be FLOAT
?
Comma or point as a separator? Or does it even matter?
Thanks
Upvotes: 3
Views: 981
Reputation: 357
http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html
An INT field doesn't store precision. If you want to store fractions/decimals, then you need to choose a data type that will support them. The MySQL documentation is pretty good about what each data type provides you. I frequently go back to the MySQL documentation when I need a refresher on data types.
Upvotes: 1
Reputation: 630559
Commas aren't stored in the table...they're represented that way in whatever you're viewing the data with.
For decimal numbers, no you cannot use INT
, it only accepts whole numbers, you likely want DECIMAL
for this (So you don't get the odd 0.3999999999999999999999999999999 that can't be stored quite right in the float).
Upvotes: 1