Вопрос

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.

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top