sql server 2005 - SQL: What do you use to store a ratio (percentage) in a database? -


Should I use decimals or floats to store a ratio in the database? Especially in SQL2005

This accuracy depends on your requirement. If you can tolerate common errors, which comes from the IEEE method of collecting floating point numbers, use a float, otherwise, use decimal if you need an accurate representation (and any of those The number that goes to the integer is that which you will use in calculating calculations as well as percentages).


Comments