mysql BLOB型別 TEXT型別
BLOB型別 | 大小(位元組) | TEXT型別 | 大小(字元個數) |
TINYBLOB | 255 (28 – 1) | TINYTEXT | 255 char |
BLOB | 65,535 (216 – 1) | TEXT | 65,535 |
MEDIUMBLOB | 16,777,215 (224 – 1) | MEDIUMTEXT | 16,777,215 |
LONGBLOB | 4GB (232 – 1) | LONGTEXT | 4GB |
-
A BLOB column with a maximum length of 255 (28 – 1) bytes. Each TINYBLOB value is stored using a 1-byte length prefix that indicates the number of bytes in the value.
-
TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
A TEXT column with a maximum length of 255 (28 – 1) characters. The effective maximum length is less if the value contains multi-byte characters. Each TINYTEXT value is stored using a 1-byte length prefix that indicates the number of bytes in the value.
-
A BLOB column with a maximum length of 65,535 (216 – 1) bytes. Each BLOB value is stored using a 2-byte length prefix that indicates the number of bytes in the value.
An optional length M can be given for this type. If this is done, MySQL creates the column as the smallest BLOBtype large enough to hold values M bytes long.
-
TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]
A TEXT column with a maximum length of 65,535 (216 – 1) characters. The effective maximum length is less if the value contains multi-byte characters. Each TEXT value is stored using a 2-byte length prefix that indicates the number of bytes in the value.
An optional length M can be given for this type. If this is done, MySQL creates the column as the smallest TEXTtype large enough to hold values M characters long.
-
A BLOB column with a maximum length of 16,777,215 (224 – 1) bytes. Each MEDIUMBLOB value is stored using a 3-byte length prefix that indicates the number of bytes in the value.
-
MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
A TEXT column with a maximum length of 16,777,215 (224 – 1) characters. The effective maximum length is less if the value contains multi-byte characters. Each MEDIUMTEXT value is stored using a 3-byte length prefix that indicates the number of bytes in the value.
-
A BLOB column with a maximum length of 4,294,967,295 or 4GB (232 – 1) bytes. The effective maximum length ofLONGBLOB columns depends on the configured maximum packet size in the client/server protocol and available memory. Each LONGBLOB value is stored using a 4-byte length prefix that indicates the number of bytes in the value.
-
LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
A TEXT column with a maximum length of 4,294,967,295 or 4GB (232 – 1) characters. The effective maximum length is less if the value contains multi-byte characters. The effective maximum length of LONGTEXT columns also depends on the configured maximum packet size in the client/server protocol and available memory. EachLONGTEXT value is stored using a 4-byte length prefix that indicates the number of bytes in the value.
-
A BLOB column with a maximum length of 255 (28 – 1) bytes. Each TINYBLOB value is stored using a 1-byte length prefix that indicates the number of bytes in the value.
-
TINYTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
A TEXT column with a maximum length of 255 (28 – 1) characters. The effective maximum length is less if the value contains multi-byte characters. Each TINYTEXT value is stored using a 1-byte length prefix that indicates the number of bytes in the value.
-
A BLOB column with a maximum length of 65,535 (216 – 1) bytes. Each BLOB value is stored using a 2-byte length prefix that indicates the number of bytes in the value.
An optional length M can be given for this type. If this is done, MySQL creates the column as the smallest BLOBtype large enough to hold values M bytes long.
-
TEXT[(M)] [CHARACTER SET charset_name] [COLLATE collation_name]
A TEXT column with a maximum length of 65,535 (216 – 1) characters. The effective maximum length is less if the value contains multi-byte characters. Each TEXT value is stored using a 2-byte length prefix that indicates the number of bytes in the value.
An optional length M can be given for this type. If this is done, MySQL creates the column as the smallest TEXTtype large enough to hold values M characters long.
-
A BLOB column with a maximum length of 16,777,215 (224 – 1) bytes. Each MEDIUMBLOB value is stored using a 3-byte length prefix that indicates the number of bytes in the value.
-
MEDIUMTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
A TEXT column with a maximum length of 16,777,215 (224 – 1) characters. The effective maximum length is less if the value contains multi-byte characters. Each MEDIUMTEXT value is stored using a 3-byte length prefix that indicates the number of bytes in the value.
-
A BLOB column with a maximum length of 4,294,967,295 or 4GB (232 – 1) bytes. The effective maximum length ofLONGBLOB columns depends on the configured maximum packet size in the client/server protocol and available memory. Each LONGBLOB value is stored using a 4-byte length prefix that indicates the number of bytes in the value.
-
LONGTEXT [CHARACTER SET charset_name] [COLLATE collation_name]
A TEXT column with a maximum length of 4,294,967,295 or 4GB (232 – 1) characters. The effective maximum length is less if the value contains multi-byte characters. The effective maximum length of LONGTEXT columns also depends on the configured maximum packet size in the client/server protocol and available memory. EachLONGTEXT value is stored using a 4-byte length prefix that indicates the number of bytes in the value.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/195110/viewspace-1126460/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Mysql BLOB、BLOB與TEXT區別及效能影響、將BLOB型別轉換成VARCHAR型別MySql型別
- MySQL中TEXT與BLOB欄位型別的區別MySql型別
- MySQL 中 blob 和 text 資料型別詳解MySql資料型別
- MySQL TEXT、DATE、SET 資料型別(轉)MySql資料型別
- PHP 操作 mysql blob 資料型別的欄位PHPMySql資料型別
- 操作Blob型別的方法(zt)型別
- SQL Server資料型別BLOBSQLServer資料型別
- MIME郵件的multipart型別與text型別的區別型別
- MySQL text型別不允許有預設值MySql型別
- 【原創】操作Blob型別的方法型別
- BLOB(二進位制大物件:text、ntext或image)型別資料的操作物件型別
- Mysql 資料型別之整數型別MySQL 資料型別
- 【MySQL資料型別3之--字元型別】MySql資料型別字元
- mysql索引型別Normal,Unique,Full Text區別以及索引方法Btree,Hash的區別MySql索引型別ORM
- MySQL 字元型別MySql字元型別
- JDBC 處理CLob和Blob型別資料JDBC型別
- Oracle 中LONG RAW BLOB CLOB型別介紹Oracle型別
- 檔案插入 Oracle資料庫 Blob型別Oracle資料庫型別
- 【MySQL資料型別1之--數值型別】MySql資料型別
- Mysql資料庫學習(二):資料型別(數值型別 日期和時間型別 字串型別)MySql資料庫資料型別字串
- MySQL索引的型別MySql索引型別
- mysql資料型別MySql資料型別
- MYSQL 資料型別MySQL 資料型別
- 【MySQL資料型別2之--日期時間型別】MySql資料型別
- SQLServer型別text運算子不相容SQLServer型別
- 資料庫text型別的長度?資料庫型別
- GBase8s BLOB型別使用操作示例型別
- mysql bigint型別和datetime型別的轉換MySql型別
- TS資料型別:型別別名/聯合型別/字面量型別/型別推論等綱要資料型別
- 淺談程式語言型別的強型別,弱型別,動態型別,靜態型別型別
- javascript基本型別 引用型別 基本包裝型別JavaScript型別
- C#的型別——值型別與引用型別C#型別
- 為什麼阿里巴巴不建議MySQL使用Text型別?阿里MySql型別
- MySQL 的資料型別MySql資料型別
- Mysql基本資料型別MySql資料型別
- Mysql 的分割槽型別MySql型別
- MySQL 日誌的型別MySql型別
- 理解MySQL資料型別MySql資料型別