Question

What database data type do I need to use to store a numerical value with 18 digits after the decimal place? I've tried double and float but it doesn't work it only shows 16 digits after the decimal place. I'm using MS SQL Server 2005 and 2008.

Was it helpful?

Solution

Assuming your values are not too big, you want to use DECIMAL. Something like DECIMAL(20, 18) (adjust the first value for the total number of digits in the number).

You can read about it here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top