I have this column that\'s
INT(10) ZEROFILL NOT NULL DEFAULT \'0000000000\',
But when I insert something like 9100000010
, I get 42949
It should have allowed 10 digits there, right?
NO, size of INT and integer types in mySQL is to set the display width when field has ZEROFILL specified.
for example if the value you inserted is 123456 then when you query it, it will displays as 0000123456 , it is just the display width and doesn't affect the value.
so the value range is determined by the datatype itself, not the display width. to store greater values, you should change the datatype to a suitable one, like BIGINT.
from mySQL reference:
INT : A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295.