Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Numeric value out of range: 1264 in mysql

Tags:

mysql

laravel

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))

my datatype is decimal(8,5) but still i am getting this error.

how can i igone and insert if it is more also after .(Dot).

like image 950
Narayana Reddy Gurrala Avatar asked Apr 12 '17 10:04

Narayana Reddy Gurrala


People also ask

How do I fix error 1264 in MySQL?

To fix the error, change your datatype to VARCHAR . Phone and Fax numbers should be stored as strings.

What is out of range value in MySQL?

When MySQL stores a value in a numeric column that is outside the permissible range of the column data type, the result depends on the SQL mode in effect at the time: If strict SQL mode is enabled, MySQL rejects the out-of-range value with an error, and the insert fails, in accordance with the SQL standard.

What is out of range value?

Out of Range (OOR) Indicators For example, if you have a machine reading that is useful in a range from 10 to 90, you may not know or care if the value is 5 or 6, just know that it is out of range, and may be output by the machine as "<10".

What does out of range mean in SQL?

"Out of range" normally means that some value is outside the expected range of valid values. For example if you have an array of length 2, trying to access position number 10 in that array could lead to an "array index out of range" error (depending on your programming language).


1 Answers

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

999.99999

since 8 is the total precision minus decimal places

like image 114
juergen d Avatar answered Oct 18 '22 22:10

juergen d