OceanBase Database supports the CHAR, VARCHAR, BINARY, and VARBINARY string types.
The following table describes the supported string types and their related information in the current version of OceanBase Database.
| Type | Length Type | Length Limit | Character Set |
|---|---|---|---|
CHAR |
Fixed-length | 256 characters | UTF8MB4 |
VARCHAR |
Variable-length | 262,144 characters | UTF8MB4 |
BINARY |
Fixed-length | 256 bytes | BINARY |
VARBINARY |
Variable-length | 1,048,576 bytes | BINARY |
For the CHAR type, the length is measured in characters. For the VARCHAR, BINARY, and VARBINARY types, the length is measured in bytes.
