469,275 Members | 1,718 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

SQL Server

If you specify the data type as DECIMAL (5,2), what’s the range of values that can go in this table?
Jul 11 '07 #1
1 850
If you specify the data type as DECIMAL (5,2), what’s the range of values that can go in this table?
decimal data type is of the format, decimal[(p[,s])] where p is the precision and s is the scale[maximum number of decimal digits that can be stored to the left of the decimal point. it is between 0 and p

p is a number with maximum of 38.

when p is 5 the values that can be stored are from - 10^5 +1 to 10^5 - 1.
since you also specified a scale of 2, your numbers can not have more than 2 decimal digits
Jul 11 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Nathan Sokalski | last post: by
9 posts views Thread by Grim Reaper | last post: by
14 posts views Thread by Developer | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.