Link to home
Start Free TrialLog in
Avatar of Roteberg
Roteberg

asked on

WARNING CODE :1265 in Mysql

Hi All.

I originally had a VARCHAR column and I want  to convert it to INT , when i run  statement

USE plan; CREATE TABLE tbl_budgetplan_new LIKE tbl_budgetplan;
ALTER TABLE tbl_budgetplan RENAME  tbl_budgetplan_old;
INSERT INTO tbl_budgetplan_new SELECT * FROM tbl_budgetplan_old;
ALTER TABLE tbl_budgetplan_new MODIFY COLUMN PersonId INT NOT NULL;
ALTER TABLE tbl_budgetplan_new RENAME tbl_budgetplan;

6 queries executed , 6 success , 0 error , 1 warning

6036 row(s) affected , 1718 warnings

warning code (1265): Data truncated for column 'PersonId' at row 1

What can I do about this ?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial