Decimal out of range

北慕城南 提交于 2019-12-06 19:59:38

问题


I'm trying to store the decimal 140.2705893427 into a SQL Server 2012 table. The column has a data type of decimal(12, 10) but I get the error:

{"Parameter value '140.2705893427' is out of range."}

Why is this?


回答1:


decimal(12, 10) means 12 total digits, 10 of which may be after the decimal point.

Your value of 140.2705893427 has 13 total digits, thus it is out of range.

Read decimal and numeric (Transact-SQL) for documentation.



来源:https://stackoverflow.com/questions/18874410/decimal-out-of-range

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!