📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

String



String Data Types

In TiDB Cloud Lake, strings can be stored in the VARCHAR field, the storage size is variable.

NameAliasesStorage Size
VARCHARSTRINGvariable

Functions

See String Functions.

Example

CREATE TABLE string_table(text VARCHAR);
DESC string_table;

Result:

┌──────────────────────────────────────────────┐ │ Field │ Type │ Null │ Default │ Extra │ ├────────┼─────────┼────────┼─────────┼────────┤ │ text │ VARCHAR │ YES │ NULL │ │ └──────────────────────────────────────────────┘
INSERT INTO string_table VALUES('tidbcloudlake');
SELECT * FROM string_table;

Result:

┌──────────────────┐ │ text │ ├──────────────────┤ │ tidbcloudlake │ └──────────────────┘

Was this page helpful?