error 1265. Data truncated for column when trying to load data from txt file

后端 未结 8 2476
萌比男神i
萌比男神i 2020-12-18 18:52

I have table in mysql table table looks like

create table Pickup
(
PickupID int not null,
ClientID int not null,
PickupDate date not null,
PickupProxy  va         


        
8条回答
  •  有刺的猬
    2020-12-18 19:33

    This error means that at least one row in your Pickup_withoutproxy2.txt file has a value in its first column that is larger than an int (your PickupId field).

    An Int can only accept values between -2147483648 to 2147483647.

    Review your data to see what's going on. You could try to load it into a temp table with a varchar data type if your txt file is extremely large and difficult to see. Easy enough to check for an int once loaded in the database.

    Good luck.

提交回复
热议问题