The type of the field (TINYINT, MEDIUMINT, INT, etc.) determines the maximum size of the integer you can put in such a field. Unsigned means you only want to store numbers greater than zero. Here is a reference table for numeric types in MySQL and what limits they have: MySQL Manual - Numeric Types.
If you define the field as unsigned, you get the same number of possible values, but they won't be split 50-50 between negative and positive numbers, as you will see from the table.
The number in brackets is the number that is used if you specify ZEROFILL on the field - that is useful if you need your numbers padded with zeros to a certain length. For example, if you create a new field as INT(5) ZEROFILL
, it will display the numbers in it for you as
00001
00002
00003
etc.
but the range will still be from -2147483648 to 2147483648. The number in brackets will be ignored if you don't specify ZEROFILL
when you define the field.