mysql blob数据类型
blob 数据类型
blob数据类型官方定义
-
A
BLOBcolumn with a maximum length of 255 (28 − 1) bytes. EachTINYBLOBvalue 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
TEXTcolumn with a maximum length of 255 (28 − 1) characters. The effective maximum length is less if the value contains multibyte characters. EachTINYTEXTvalue is stored using a 1-byte length prefix that indicates the number of bytes in the value. -
A
BLOBcolumn with a maximum length of 65,535 (216 − 1) bytes. EachBLOBvalue is stored using a 2-byte length prefix that indicates the number of bytes in the value.An optional length
Mcan be given for this type. If this is done, MySQL creates the column as the smallestBLOBtype large enough to hold valuesMbytes long. -
TEXT[(*M*)] [CHARACTER SET *charset_name*] [COLLATE *collation_name*]A
TEXTcolumn with a maximum length of 65,535 (216 − 1) characters. The effective maximum length is less if the value contains multibyte characters. EachTEXTvalue is stored using a 2-byte length prefix that indicates the number of bytes in the value.An optional length
Mcan be given for this type. If this is done, MySQL creates the column as the smallestTEXTtype large enough to hold valuesMcharacters long. -
A
BLOBcolumn with a maximum length of 16,777,215 (224 − 1) bytes. EachMEDIUMBLOBvalue 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
TEXTcolumn with a maximum length of 16,777,215 (224 − 1) characters. The effective maximum length is less if the value contains multibyte characters. EachMEDIUMTEXTvalue is stored using a 3-byte length prefix that indicates the number of bytes in the value. -
A
BLOBcolumn with a maximum length of 4,294,967,295 or 4GB (232 − 1) bytes. The effective maximum length ofLONGBLOBcolumns depends on the configured maximum packet size in the client/server protocol and available memory. EachLONGBLOBvalue is stored using a 4-byte length prefix that indicates the number of bytes in the value.