What is the maximum size of int(10) in Mysql
Solution 1:
INT(10)
means you probably defined it as INT UNSIGNED
.
So, you can store numbers from 0
up to 4294967295
(note that the maximum value has 10 digits, so MySQL automatically added the (10)
in the column definition which (10) is just a format hint and nothing more. It has no effect on how big number you can store).
You can use BIGINT UNSIGNED
if you want to store bigger values. See the MySQL docs: Integer Types (Exact Value)
Solution 2:
An unsigned int has the max value of 4294967295 no matter if its INT(1) or int(10) and will use 4 bytes of data.
as stated here.
Solution 3:
Just use BigInt Instead of Int in Mysql and if you want explanation in brief then goto
MySQL DataTypes