I need to store some very large and small numbers in the database. I am going to be using these numbers as the parameter for ORDER BY in SELECT statements.
So, for example, one column might have the value
0.000000001
While another might have the value
1000000
What datatype should I use to store these values? I’m thinking double, but I want to make sure.
I would probably go with a DECIMAL for very small numbers because it allows a fixed decimal point. If your large numbers don’t have decimal precision, an INT data type should be fine.