The Teradata Database has 6 Character data types:
Teradata Database Data Type | Description |
---|---|
Char (n) | Represents a fixed length character string. "n" specifies the number of characters for LATIN, UNICODE or GRAHIC Server Character Sets. "n" specifies the number of bytes for KANJISJIS or KANJI1 Server Character set. |
CLOB (n) | Represents a variable length Character Large Object (CLOB) of length 0 to n. "n" specifies the maximum number of characters for LATIN or UNICODE Server Character Sets. |
Graphic (n) | An alias for "Char(n) Character Set Graphic". |
JSON (n) | Represents a variable length JavaScript Object Notation (JSON) of length 0 to n. "n" specifies the maximum number of characters for LATIN or UNICODE Server Character Sets. |
VarChar (n) | Represents a variable length character string of length 0 to n. "n" specifies the number of characters for LATIN, UNICODE or GRAHIC Server Character Sets. "n" specifies the number of bytes for KANJISJIS or KANJI1 Server Character set. |
VarGraphic (n) | An alias for "VarChar(n) Character Set Graphic". |
The Teradata Database supports 5 Server Character Sets:
Server Character Set Name | Description |
---|---|
LATIN | Fixed 8-bit characters from the ASCII ISO 8859 Latin1 or ISO 8859 Latin9 repertoires. |
UNICODE | Fixed 16-bit characters from the UNICODE 4.1 standard. |
GRAPHIC | Fixed 16-bit UNICODE characters defined by IBM Corporation for DB2. |
KANJI1 | Mixed single-byte/multi-byte characters as defined by KanjiEBCDIC, KanjiShift-JIS, or KanjiEUC, depending on the current Session Character Set. |
KANJISJIS | Mixed single-byte/multi-byte characters intended for Japanese applications that rely on KanjiShiftJIS characteristics. |
The Teradata Database translates characters from the Server Character Set to the Session Character Set when it sends character data to the Data Provider. The .NET Data Provider for Teradata converts UNICODE characters to or from the Session Character Set when it communicates with the Teradata Database. Conceptually the Session Character Set defines the one and only character repertoire for communication between the Data Provider and the Teradata Database. The .NET Data Provider for Teradata supports ASCII, UTF8, UTF16, KANJISJIS_0S session character sets in addition to the Windows Compatible session character sets. TdConnectionStringBuilder.SessionCharacterSet property documents all supported Session Character Sets.
The Teradata Database "SQL Data Type and Literals" manual describes each type in detail. This sections shows how the Teradata Database Character data types map to the .NET Framework type system.
The Base Class Library (BCL) has 2 Character data types:
The .NET Data Provider for Teradata has one Character Provider Specific Types and it also converts the Teradata Database Character data types to the BCL types.
Teradata Database Type | BCL Type | Provider Specific Type |
---|---|---|
Char | System.Char[] | NA |
System.String | ||
VarChar | System.Char[] | NA |
System.String | ||
CLOB | System.Char[] | TdClob |
System.String | ||
JSON | System.Char[] | TdClob |
System.String |