简体   繁体   English

将数字转换为数据类型数字的算术溢出错误

[英]Arithmetic overflow error converting numeric to data type numeric

i am having hard time determining the length of a Decimal data type.我很难确定 Decimal 数据类型的长度。 The data i have in column is like 0.08,1.2,12.35,121.36.我在列中的数据就像 0.08,1.2,12.35,121.36。 Now if i go for (2,2) it throws an error: Arithmetic overflow error converting numeric to data type numeric.现在,如果我 go for (2,2) 它会引发错误:将数字转换为数据类型数字的算术溢出错误。 Just wondering should it be (6,2)?只是想知道它应该是(6,2)吗? and if yes can anybody tell me Why 6 and 2?如果是,谁能告诉我为什么是 6 和 2?

In syntax like在语法中

NUMERIC(precision, scale)

precision is the total number of digits (count digits on both sides of the decimal point), and scale is the number of digits to the right of the decimal point. precision是总位数(计数小数点两边的位数), scale是小数点右边的位数。

From your examples, should be NUMERIC(5,2) - meaning five numbers in total and 2 after the decimal point.从您的示例中,应该是NUMERIC(5,2) - 表示总共五个数字和小数点后 2 个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM