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 sets |
|---|---|---|---|
CHAR |
Fixed | 256 characters | UTF8MB4 |
VARCHAR |
Variable | 65,535 bytes | UTF8MB4 |
BINARY |
Fixed | 256 bytes | BINARY |
VARBINARY |
Variable | 65,535 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.