OceanBase AI Database supports the large object data type BLOB and the text data type TEXT.
The following table describes the LOB and text types supported by the current version of OceanBase AI Database and their related information.
Type |
Length |
Maximum storage length (bytes) |
Character set |
|---|---|---|---|
TINYBLOB |
variable | 255 | BINARY |
BLOB |
variable | 65535 | BINARY |
MEDIUMBLOB |
variable | 16777215 | BINARY |
LONGBLOB |
variable | 4398046511103 (about 4 TB) | BINARY |
TINYTEXT |
variable | 256 | UTF8MB4 |
TEXT |
variable | 65535 | UTF8MB4 |
MEDIUMTEXT |
variable | 16777215 | UTF8MB4 |
LONGTEXT |
variable | 4398046511103 (about 4 TB) | UTF8MB4 |
STRING |
variable | 16777216 | UTF8MB4 |
In most cases, you can treat a BLOB column as a VARBINARY column and a TEXT column as a VARCHAR column. The BLOB and TEXT/STRING data types differ from the VARBINARY and VARCHAR data types in the following aspects:
You must specify the index prefix length for
BLOBandTEXTcolumns. ForCHARandVARCHARcolumns, the prefix length is optional.BLOBandTEXT/STRINGcolumns cannot have aDEFAULTvalue.