OceanBase Database supports the following character data types: CHAR, VARCHAR, BINARY, and VARBINARY.
The following table describes the supported character data types in detail.
| Type | Fixed/Variable length | Maximum length | Character set |
|---|---|---|---|
CHAR |
Fixed | 256 characters | UTF8MB4 |
VARCHAR |
Variable | 262,144 bytes | UTF8MB4 |
BINARY |
Fixed | 256 bytes | BINARY |
VARBINARY |
Variable | 1,048,576 bytes | BINARY |
Note that the length of the CHAR type is in characters, and that of the VARCHAR, BINARY, and VARBINARY types are in bytes.