MySQL Integer Types

When declaring an integer in MySQL the number after the integer does not have any bearing on the size of the information in the database or the range of possible values.


INT(1) uses the same space as INT(11)


If you want to specify a smaller / different data size, this can be done with:

TINYINT  = 1byte (256 possible values)

SMALLINT = 2bytes  (65535 possible values)

MEDIUMINT = 3 bytes (16777215)

INT = 4 bytes (4294967295)

BIGINT = 8bytes (18446744073709551615 possible values!!)


The value after the type declaration INT(11), is purely an instruction suggesting to MySQL how many zero digits to left pad the number with for display.  e.g. 00000000001.   In PHP/MySQL it has no effect and is best left to the defaults.


To read more about this, go to