I have this column that’s
INT(10) ZEROFILL NOT NULL DEFAULT '0000000000',
But when I insert something like 9100000010, I get 4294967295
It should have allowed 10 digits there, right?
How to do this right?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Int has maximum value range :
hence, you are getting the maximum value due to the overflow.
use bigint instead, which has 8 bytes
and you shall be fine.
http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html#integer-types