| 型態名稱 | 記憶體空間 | 數值範圍 | 無號數(UNSIGNED) |
| TINYINT | 1bytes | -128~127 | 0-255 |
| SMALLINT | 2bytes | -32768~32767 | 0-65535 |
| MEDIUMINT | 3bytes | -8388608~8388607 | 0-16777215 |
| INT 或 INTEGER | 4bytes | -2147483648~2147483647 | 0-4294967295 |
| BIGINT | 8bytes | -922337203685475808 ~922337203685475807 | 0-188446744073709550615 |
| FLOAT(M,D) | 4(<24)/8 | 依據變數值而定 | 無 |
| FLOAT | 4bytes | 無 | |
| DOUBLE(M,D) | 8bytes | 依據變數值而定 | 無 |
| DECIMAL(M,D) | MB單位+2 | 依據變數值而定 | 無 |
<字元(Character)或字串(String)>
| 型態名稱 | 最大長度 | 儲存空間 |
| CHAR(X) | 255bytes | x bytes |
| VARCHAR(X) | 255bytes | x+1bytes |
| TINYTEXT | 255bytes | x+1bytes |
| TEXT | 65535bytes | x+2bytes |
| MEDIUMTEXT | 16,777,215bytes | x+3bytes |
| LONGTEXT | 4,294,967,295bytes | x+4bytes |
| TINYBLOB | 255bytes | x+1bytes |
| BLOB | 65535bytes | x+2bytes |
| MEDIUMBLOB | 16,777,215bytes | x+3bytes |
| LONGBLOB | 4,294,967,295bytes | x+4bytes |


0 comments:
Post a Comment