0

I want to update value in the table's column in sql server which is of type decimal(2,2) and I have used following query to update that

update Bedding
  set Bedroom = 1.0
  where BeddingId = 5

But I am having following error :Arithmetic overflow error converting numeric to data type numeric. Thanks in advance.

2
  • You confirmed both Bedroom and BeddingId are numeric? Commented Aug 23, 2013 at 11:48
  • Yes, BeddingId is int and Bedroom is decimal(2,2) Commented Aug 23, 2013 at 11:49

1 Answer 1

1

Am column defined as decimal(n,m) holds n decimal digits, m of which are the fraction part. So decimal(2,2) is 2 digits long, both of which are the fraction part. This will only be able to take values in the range -0.99 to 0.99.

Sign up to request clarification or add additional context in comments.

1 Comment

ok, so i need to change the datatype of Bedroom from decimal(2,2) to decimal(3,2) if i want to enter this type of value. Thanks, for explanation