What is the maximum precision with Decimal in SQL server 2005
I need to retain upto 17 decimal places. What is the appropriate precision with Decimal in SQL server 2005开发者_运维知识库 ?
Depends how many values you want left of the decimal point, probably 17. So precision should be 17 + 17 = 34, and scale = 17.
So long as your scale is 17 and your precision is >= 17 (whatever your precision - scale is how many digits you can have left of the decimal point).
http://msdn.microsoft.com/en-us/library/ms187746(v=SQL.90).aspx
I realize this question is old, but here is the answer that I found useful:
From the docs
In SQL Server, the default maximum precision of numeric and decimal data types is 38. In earlier versions of SQL Server, the default maximum is 28.
加载中,请稍侯......
精彩评论