Data Type | Storage Required |
TINYINT | 1 byte |
SMALLINT | 2 bytes |
MEDIUMINT | 3 bytes |
INT, INTEGER | 4 bytes |
BIGINT | 8 bytes |
FLOAT(p) | 4 bytes if 0 <= p <= 24, 8 bytes if 25 <= p <= 53 |
FLOAT | 4 bytes |
DOUBLE [PRECISION], REAL | 8 bytes |
DECIMAL(M,D), NUMERIC(M,D) | Varies; see following discussion |
BIT(M) | approximately (M+7)/8 bytes |
10.16.Introduction | ||||
10.16.1. | The basic datatypes | |||
10.16.2. | Date Datatypes | |||
10.16.3. | Numeric Types Storage | |||
10.16.4. | Numeric Types | |||
10.16.5. | ZEROFILL,UNSIGNED,SERIAL,SERIAL DEFAULT VALUE | |||
10.16.6. | Using Data Types from Other Database Engines | |||
10.16.7. | Data type mapping occurs at table creation time, after which the original type specifications are discarded. | |||
10.16.8. | Storage Requirements for Numeric Types | |||
10.16.9. | Storage Requirements for Date and Time Types | |||
10.16.10. | The format of the zero value for each type. |