STRING
Descriptionโ
STRING stores variable-length strings. The default length limit is 1048576 bytes (approximately 1 MB), adjustable up to 2147483643 bytes (approximately 2 GB). The length is also constrained by the BE configuration parameter string_type_length_soft_limit_bytes, which sets a soft limit on string length.
STRING can only be used in value columns. It cannot be used in key, partition, or bucket columns.
Variable-length strings use UTF-8 encoding. English characters typically occupy 1 byte, and Chinese characters typically occupy 3 bytes.
Keywordsโ
STRING
Type aliases and metadata displayโ
STRING and TEXT define the same type in VeloDB Cloud. Different interfaces display that type differently:
| Interface | Display for a STRING column |
|---|---|
SHOW CREATE TABLE and DESC | text |
information_schema.columns.DATA_TYPE | varchar, for MySQL compatibility |
information_schema.columns.COLUMN_TYPE | string |
These names do not change the stored type or its length limit. To distinguish a STRING column from a length-limited VARCHAR column in metadata, check COLUMN_TYPE.