I have a column which is set to int(20) when I try and insert a number like 622108120237, it says it’s out of range. Why?
I have a column which is set to int(20) when I try and insert
Share
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.
An
int, with MySQL, is stored on 4 bytes, and, as such, can only contain values between-2147483648and2147483647.622108120237is greater than2147483647; so it doesn’t fit into anint— looks like you are going to have to use abigint.See the Datatypes – Numeric types section of
the MySQL manual, about that.