Reputation: 12179
Considering I know the range of a field (0 - 10) and I only need to keep precision to one decimal place 00.0, what is the best field type for this column?
Upvotes: 1
Views: 173
Reputation: 219824
DECIMAL. A lot of people use FLOAT
but that is unecessary in most situations.
DECIMAL(3,1)
Upvotes: 6
Reputation: 15198
The data type you want is DECIMAL(3, 1)
. Per the documentation, this will store any value from -99.9
to 99.9
.
Upvotes: 3