what data type should I use for storing small decimal value
what data type should I use to store small decimal value? Ranging from -50.00
to 50.00
?
Thanks,
Try DECIMAL(4,2)
which would allow you to store -99.99 to 99.99
MSDN documentation for DECIMAL.
The 4 represents the precision which is the total number of digits that can be stored (to the left and right of the decimal place).
The 2 represents the scale which is the number of digits that can appear after the decimal place.
Look at
http://msdn.microsoft.com/en-us/library/ms187746.aspx
Basically you need two points before the decimal and 2 after?
columnname precision(4)
精彩评论