Very very large numbers in SQL

I’m curious how one might represent especially large numbers in a SQL database?

The max value for BIGINT is 9,223,372,036,854,775,807 (9 quintillion), which incidentally is almost five times smaller than the number of possible permutations of a Rubik’s cube!

Say you’re dealing with the mass of planetary objects, which could be difficult to represent in terms other than exponential numbers.

The mass of our moon is 7.35x10^22 kg.
Of course there are other ways of representing this mass, such as a comparative measure against Earth mass etc, but it gets tricky when you’re dealing with many objects of wildly varying masses, all within a single table.

Should I just store these values as text?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.