数值超出范围:mysql 中的 1264
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43367408/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Numeric value out of range: 1264 in mysql
提问by Narayana Reddy Gurrala
My Error,
我的错误,
SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'pro_price_dis' at row 1 (SQL: insert into
rp_cal_table(productID,RSP_dis,RSP_mar,RRP_mar,cont_RRP_mar,cont_RSP_mar,sea_cloud_price,sea_cloud_sal_price,pro_price_dis,mar_pro_price_dis,pro_price_mar,mar_pro_price_mar,sal_pro_price,mar_sal_pro_price,method,DB_price,updated_at,created_at) values (32, 0, 0, 0.4, 630.4, 0, 0.30, 0, 1103.2, 0.14285714285714, 1153.1707317073, 0.18, 0, 0, , 1153.1707317073, 2017-04-12 10:38:56, 2017-04-12 10:38:56))
SQLSTATE[22003]: 数值超出范围:1264 列 'pro_price_dis' 在第 1 行的超出范围值(SQL:插入到
rp_cal_table(productID,RSP_dis,RSP_mar,RRP_mar,cont_RRP_mar,cont_RSP_mar,sea_cloud_price,sea_cloud_sal_price,pro_price_dis,mar_pro_price_dis,pro_price_mar,mar_pro_price_mar,sal_pro_price,mar_sal_pro_price,method,DB_price,updated_at,created_at) 值( 32, 0, 0, 0.4, 630.4, 0, 0.30, 0, 1103.2, 0.14285714285714, 1153.1707317073, 0.18, 0, 0, , 107-03-104:107-104:107-103-1073:1073 :56))
my datatype is decimal(8,5)but still i am getting this error.
我的数据类型是,decimal(8,5)但我仍然收到此错误。
how can i igone and insert if it is more also after .(Dot).
如果它在 .(点)之后还有更多,我该如何进行并插入。
回答by juergen d
The value of the column is
该列的值为
1103.2
but you mention the data type is decimal(8,5)which means the max number allowed is
但你提到的数据类型是decimal(8,5)这意味着允许的最大数量是
999.99999
since 8is the totalprecision minus decimal places
因为8是总精度减去小数位

