Send feedback on this topic.
Teradata.Client.Provider
Character Data Types Overview
.NET Data Provider for Teradata > Developer's Guide > Data Types > Character Data Types Overview

The Advanced SQL Engine has 6 Character data types:

SQL 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 SQL Engine 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 SQL Engine 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 SQL Engine. Conceptually the Session Character Set defines the one and only character repertoire for communication between the Data Provider and the SQL Engine. 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 "SQL Data Type and Literals" manual describes each type in detail. This sections shows how the SQL Engine Character data types map to the .NET type system.

The Base Class Library (BCL) has 2 Character data types:

  1. System.Char
  2. System.String

The .NET Data Provider for Teradata has one Character Provider Specific Types and it also converts the SQL Engine Character data types to the BCL types.

SQL Data 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

In This Section

Char Data Type

VarChar Data Type

Clob Data Type

Json Data Type