I have a mysql database, and I am using it as a temprorarily store captcha values. It has a auto incremented id key, with int(11) field. What happens if this value gets bigger than 11 digits?
A typical INT uses 4 bytes, so it can store the numbers:
Signed: -2147483648 to 2147483647
Unsigned: 0 to 4294967295
A BIGINT uses 8 bytes, so it can store the numbers:
Signed: -9223372036854775808 to 9223372036854775808
Unsigned: 0 to 18446744073709551615
This number (11) has absolutely nothing to do with column range - [SIGNED] INTEGER defines a range (-2147483648 - 2147483647).
Number within parentheses is being used only when combined with ZEROFILL. Then it defines the "length" of displayed number, ie. value 275552 will be returned as string 00000275552.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With