I saw this cause confusion twice on IRC today, so I think I'll make this a new FAQ entry, even though it is clearly spelled out in the Manual.
Integer columns can be created with an optional number in brackets after the integer declaration, for example:
CREATE TABLE intTest(
id INT(2)
);
Here's what the MySQL Reference Manual says:
Another extension is supported by MySQL for optionally specifying the display width of an integer value in parentheses following the base keyword for the type (for example, INT(4)). This optional display width specification is used to left-pad the display of values having a width less than the width specified for the column.
The display width does not constrain the range of values that can be stored in the …
[Read more]