よく使うものを中心に。
MySQL | Postgres | 容量 |
---|---|---|
TINYINT | - | 1B |
SMALLINT | SMALLINT | 2B |
INT | INT | 4B |
BIGINT | BIGINT | 8B |
FLOAT | NUMERIC | 4B |
DATE | DATE |
1000-01-01〜9999-12-31 4713-01-01 BC〜:9999-12-31 |
DATETIME | - | 1000-01-01 00:00:00〜9999-12-31 23:59:59 |
TIME | TIME | 00:00:00〜23:59:59 |
TIMESTAMP | TIMESTAMP |
1970-01-01 00:00:01〜2038-01-19 03:14:07 4713-01-01 00:00:00 BC〜9999-12-31 00:00:00 |
CHAR | CHAR |
255B 1GB |
VARCHAR | VARCHAR |
65KB 1GB |
TINYTEXT | - | 255B |
TEXT | TEXT |
65KB 1GB |
MEDIUMTEXT | - | 16MB |
LONGTEXT | - | 4GB |