I need to find the maximum values of my stored integers in mysql, such as customer_id is int(8) how can i find the maximum number of customers that can be stored?
Thanks
I need to find the maximum values of my stored integers in mysql, such as customer_id is int(8) how can i find the maximum number of customers that can be stored?
Thanks
How can I find the maximum value of an
int(x)
in MySQL?
By looking at the documentation obviously: an unsigned INT
ranges from 0
to 4294967295
. A signed INT
ranges from -2147483648
to 2147483647
.
Note that, counter-intuively enough, the size of the datatype (8
in INT(8)
) has no impact whatsoever on the range of values it can store. That's just a hint to the database of how many characters should be padded when the data is displayed.