I\'m under the assumption that INT(1) is the exact same thing as TINYINT(1) but I really have no idea. Whenever I\'ve had values that can only be a single integer (e.g. a va
To summarize the accepted answered :
The number in parentheses indicates the *number of characters to display that field*, **not** the storage size of the field.
But if you want to know the storage size, you should check the MySQL source documents.
Source: MySQL Docs: Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT
Direct quote from source documentation :
TINYINT : 1 byte, -128 to 127 signed, 0 to 255 unsigned
SMALLINT : 2 bytes, -32768 to 32767 signed, 0 to 65535 unsigned
MEDIUMINT : 3 bytes, -8388608 to 8388607 signed, 0 to 16777215 unsigned
INT : 4 bytes, -2147483648 to 2147483647 signed, 0 to 4294967295 unsigned
BIGINT : 8 bytes, -2^63 to 2^63-1 signed, 0 to 2^64-1 unsigned