출처 : http://www.jakartaproject.com/
Storage Requirements for Numeric Types
Data Type | Storage Required |
TINYINT |
1 byte |
SMALLINT |
2 bytes |
MEDIUMINT |
3 bytes |
INT , INTEGER |
4 bytes |
BIGINT |
8 bytes |
FLOAT( |
4 bytes if 0 <= p <= 24, 8 bytes if 25 <= p <= 53 |
FLOAT |
4 bytes |
DOUBLE [PRECISION] , REAL |
8 bytes |
DECIMAL( , NUMERIC( |
Varies; see following discussion |
BIT( |
approximately (M +7)/8 bytes |
Storage Requirements for Date and Time Types
Data Type | Storage Required |
DATE |
3 bytes |
DATETIME |
8 bytes |
TIMESTAMP |
4 bytes |
TIME |
3 bytes |
YEAR |
1 byte |
Storage Requirements for String Types
Data Type | Storage Required |
CHAR( |
bytes, 0 <= 255 |
VARCHAR( |
L + 1 bytes, where and 0 <= 255 (see note below) or L + 2 bytes, where and 256 <= 65535 (see note below). |
BINARY( |
bytes, 0 <= 255 |
VARBINARY( |
L + 1 bytes, where and 0 <= 255 (see note below) or L + 2 bytes, where and 256 <= 65535 (see note below). |
TINYBLOB , TINYTEXT |
L +1 byte, where L < 28 |
BLOB , TEXT |
L +2 bytes, where L < 216 |
MEDIUMBLOB , MEDIUMTEXT |
L +3 bytes, where L < 224 |
LONGBLOB , LONGTEXT |
L +4 bytes, where L < 232 |
ENUM(' |
1 or 2 bytes, depending on the number of enumeration values (65,535 values maximum) |
SET(' |
1, 2, 3, 4, or 8 bytes, depending on the number of set members (64 members maximum) |
'DATABASE' 카테고리의 다른 글
[mysql] auto_increment 값 설정 (0) | 2007.06.29 |
---|---|
[MySQL] Data Type & bytes (0) | 2007.06.04 |
tomcat + mysql 연동 (2) | 2007.05.28 |