Represents a variable length character string of length 0 to n for internal character storage. LONG VARCHAR specifies the longest permissible variable length character string for internal character storage.
ANSI Compliance
VARCHAR is ANSI SQL:2011 compliant.
LONG VARCHAR, VARGRAPHIC, and LONG VARGRAPHIC are Teradata extensions to the ANSI SQL:2011 standard.
Syntax
{ { VARCHAR | { CHARACTER | CHAR } VARYING } ( n ) [ { CHARACTER | CHAR } SET ] server_character_set | LONG VARCHAR | VARGRAPHIC ( n ) | LONG VARGRAPHIC } [ attributes [...] ]
Syntax Elements
- n
- The maximum number of characters or bytes allotted to the column defined with this server character set:
- For the LATIN server character set, the maximum value for n is 64000 characters.
- For the UNICODE and GRAPHIC server character sets, the maximum value for n is 32000 characters.
- For the KANJISJIS server character set, the maximum value for n is 32000 bytes.
- server_character_set
- The server character set for the character column being defined.
- attributes
- Appropriate data type, column storage, or column constraint attributes.