String Types

Applies to: ✅ Data Cloud SQL ✅ Tableau Hyper API

Data Cloud SQL supports three string types.

NameDescription
textA string of variable length
character varying(n), varchar(n)A string with a limited variable length
character(n), char(n)A string with a fixed length. Padding is added if the string doesn’t fill the fixed length.

The text type stores strings of any length up to 2 GB.

SQL defines two primary character types: character varying(n) and character(n), where n is a positive integer. Both of these types can store strings up to n characters in length. An attempt to store a longer string results in only the first n characters being stored. If the string to be stored is shorter than the declared length, values of the type character are padded. Character type character varying stores shorter string without padding.

If you don’t provide a length specifier, character is equivalent to character(1) and character varying accepts strings with a length of up to 2 GB.

Data Cloud SQL internally stores all string ‌as UTF-8, and there are no character set considerations.

Create and insert commands are only supported in Tableau Hyper API.