On Mon, 14 Jun 2010, Michael Dykman wrote:
11 characters of display allow for any int of any size, signed or
unsigned. When you do not specify a length attribute in a
declaration, MySQL uses 11 as the default.
As an astrophysicist, I've always considered a flaw the fact that mysql
(or SQL in
AFAIK, the number in parenthesis is ONLY for display purposes in formatting
the size of the column in mySQL command line output, NOT the size of the
data that can be held.
I think they use (11) because unsigned will need one extra character for
the minus sign.
INT SIGNED = -2147483648 to 21474836
11 characters of display allow for any int of any size, signed or
unsigned. When you do not specify a length attribute in a
declaration, MySQL uses 11 as the default.
For your application, use what makes sense for your problem's domain.
- michael dykman
On Mon, Jun 14, 2010 at 12:14 PM, Ryan