Why can't I insert 10 digits when my column is INT(10)

后端 未结 6 1778
孤独总比滥情好
孤独总比滥情好 2021-01-17 05:24

I have this column that\'s INT(10) ZEROFILL NOT NULL DEFAULT \'0000000000\',

But when I insert something like 9100000010, I get 42949

6条回答
  •  执念已碎
    2021-01-17 06:10

    you reached the maximum for int. The int maximum value range for int in mysql is 4294967295 (unsigned). So you have to use BIGINT. You can get more informations about this here: Mysql Numeric types

    Hope this helps

    Kind Regards

提交回复
热议问题