Mega Code Archive

 
Categories / MySQL Tutorial / Data Types
 

Storage Requirements for Numeric Types

Data Type Storage Required TINYINT1 byte SMALLINT2 bytes MEDIUMINT3 bytes INT, INTEGER4 bytes BIGINT8 bytes FLOAT(p)4 bytes if 0 FLOAT4 bytes DOUBLE [PRECISION], REAL8 bytes DECIMAL(M,D), NUMERIC(M,D)Varies; see following discussion BIT(M)approximately (M+7)/8 bytes