Generally, you cannot specify the number of digits after the decimal point for a floating point number. Floating-point data types store the closest floating-point approximation to any given value. The closest floating point approximation is unlikely to have the number of digits you want. Although you could suppress every digit after the third, it will change the appearance of the value, not the value itself.
Whole is a completely different story. An integer β stored, converted, or converted to a floating-point data type β will be stored exactly in a large range. For floating point data types, it is not necessary to store any fractional units for integers.
I would suggest the best for you
- Avoid floating point integers unless you need fractional units or
- distinguishes integers to decimal or numeric if you need fractional units or
- handles display problems completely in the application code.
Mike Sherrill 'Cat Recall'
source share