What is the maximum precision with Decimal in SQL server 2005
16,389
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
Author by
Relativity
A guy with average IQ - still try to explore microsoft .net day by day :)
Updated on June 05, 2022Comments
-
Relativity almost 2 years
I need to retain upto 17 decimal places. What is the appropriate precision with Decimal in SQL server 2005 ?
-
Relativity over 13 yearsBut When I gave Decimal(20,17)...it shows arithmetic overflow
-
Relativity over 13 yearsDoes Decimal(20,17) means ...20 integer before the decimal point and 17 integers after decimal point?
-
markmnl over 13 yearsNo it mean 20 digits over all and 17 after leaving 3 before.
-
Relativity over 13 yearsI have a value..Decimal(17,11). when I multiply this value with another decimal...i need to maintain the deimal values
-
Necreaux over 2 yearsThe question specifies SQL Server 2005, but 10+ years later the link for the latest version may prove useful: docs.microsoft.com/en-us/sql/t-sql/data-types/…